diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-16 00:43:00 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-16 00:43:00 +0000 |
commit | 580efb24757f6393ff5cb069f13ea79800f306c4 (patch) | |
tree | 07a3b8f414927a1df266b6b833c124df6cc99059 /clang/lib | |
parent | e79b62d923b44117559f3b375499a7852bd96d63 (diff) | |
download | bcm5719-llvm-580efb24757f6393ff5cb069f13ea79800f306c4.tar.gz bcm5719-llvm-580efb24757f6393ff5cb069f13ea79800f306c4.zip |
[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
"-arm-use-movt=0".
This change is needed since backend options do not make it to the backend
when doing LTO and are not capable of changing the behavior of code-gen
passes on a per-function basis.
rdar://problem/21529937
Differential Revision: http://reviews.llvm.org/D11025
llvm-svn: 242368
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 8c11992f1f8..89e3987170b 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -718,6 +718,10 @@ static void getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, } else if (KernelOrKext && (!Triple.isiOS() || Triple.isOSVersionLT(6))) { Features.push_back("+long-calls"); } + + // The kext linker doesn't know how to deal with movw/movt. + if (KernelOrKext) + Features.push_back("+no-movt"); } void Clang::AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs, @@ -793,10 +797,6 @@ void Clang::AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs, if (KernelOrKext) { CmdArgs.push_back("-backend-option"); CmdArgs.push_back("-arm-strict-align"); - - // The kext linker doesn't know how to deal with movw/movt. - CmdArgs.push_back("-backend-option"); - CmdArgs.push_back("-arm-use-movt=0"); } // -mkernel implies -mstrict-align; don't add the redundant option. |