Bug 141989 - CMake build of libllvmForJSC.so should limit its export list like the Xcode build does
Summary: CMake build of libllvmForJSC.so should limit its export list like the Xcode b...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-24 15:29 PST by Filip Pizlo
Modified: 2015-02-24 23:00 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.95 KB, patch)
2015-02-24 20:49 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
Patch (1.75 KB, patch)
2015-02-24 20:49 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2015-02-24 15:29:00 PST
Our Xcode build of libllvmForJSC.dylib only exports one symbol.  This protects our LLVM instance from having any interaction with other LLVMs that might be linked by the client.

We do it in Configurations/LLVMForJSC.xcconfig:

OTHER_LDFLAGS_HIDE_SYMBOLS = -Wl,-exported_symbol -Wl,_initializeAndGetJSCLLVMAPI -Wl,-all_load;

Looking at libllvmForJSC.so, it's clear that it's exporting the world.  I just did an nm on it and there are many symbols with uppercase letter codes, indicating that they are global.
Comment 1 Filip Pizlo 2015-02-24 20:49:08 PST
Created attachment 247303 [details]
Patch
Comment 2 Filip Pizlo 2015-02-24 20:49:55 PST
Created attachment 247304 [details]
Patch
Comment 3 Gyuyoung Kim 2015-02-24 22:15:07 PST
Comment on attachment 247304 [details]
Patch

LGTM
Comment 4 WebKit Commit Bot 2015-02-24 23:00:12 PST
Comment on attachment 247304 [details]
Patch

Clearing flags on attachment: 247304

Committed r180618: <http://trac.webkit.org/changeset/180618>
Comment 5 WebKit Commit Bot 2015-02-24 23:00:16 PST
All reviewed patches have been landed.  Closing bug.