diff options
author | Petr Hosek <phosek@chromium.org> | 2017-11-22 01:38:31 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-11-22 01:38:31 +0000 |
commit | 5668d83e0e7b1221eb440e0e5aef049306b050a1 (patch) | |
tree | 46f7b899a21c49b251a367969ee911ed35767e3f /clang/lib/Driver/ToolChain.cpp | |
parent | 0a340ab31c85b797b0d355dfcc1170aaf850822d (diff) | |
download | bcm5719-llvm-5668d83e0e7b1221eb440e0e5aef049306b050a1.tar.gz bcm5719-llvm-5668d83e0e7b1221eb440e0e5aef049306b050a1.zip |
[Driver] Make the use of relax relocations a per target option
The support for relax relocations is dependent on the linker and
different toolchains within the same compiler can be using different
linkers some of which may or may not support relax relocations.
Give toolchains the option to control whether they want to use relax
relocations in addition to the existing (global) build system option.
Differential Revision: https://reviews.llvm.org/D39831
llvm-svn: 318816
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChain.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index fac0a5bbff5..741f4284cbb 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -90,6 +90,10 @@ bool ToolChain::useIntegratedAs() const { IsIntegratedAssemblerDefault()); } +bool ToolChain::useRelaxRelocations() const { + return ENABLE_X86_RELAX_RELOCATIONS; +} + const SanitizerArgs& ToolChain::getSanitizerArgs() const { if (!SanitizerArguments.get()) SanitizerArguments.reset(new SanitizerArgs(*this, Args)); |