mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1494216 - Use the -Bsymbolic linker flag to build clang. r=froydnj
With libLLVM being a shared library exporting many symbols, all internal calls using those symbols default to go through the PLT, which is unnecessary (and costly) overhead. Using -Bsymbolic makes internal calls go directly to the right place without going through the PLT. Differential Revision: https://phabricator.services.mozilla.com/D7029
This commit is contained in:
parent
12a859a177
commit
d8f65840cc
@ -616,7 +616,8 @@ if __name__ == "__main__":
|
||||
# Silence clang's warnings about arguments not being used in compilation.
|
||||
extra_cxxflags2 = ["-fPIC", '-Qunused-arguments']
|
||||
extra_asmflags = []
|
||||
extra_ldflags = []
|
||||
# Avoid libLLVM internal function calls going through the PLT.
|
||||
extra_ldflags = ['-Wl,-Bsymbolic']
|
||||
|
||||
if 'LD_LIBRARY_PATH' in os.environ:
|
||||
os.environ['LD_LIBRARY_PATH'] = ('%s/lib64/:%s' %
|
||||
|
Loading…
Reference in New Issue
Block a user