]> granicus.if.org Git - clang/commitdiff
Driver/Darwin: Disable movw/movt with -mkernel or -fapple-kext.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 18 Apr 2011 21:26:42 +0000 (21:26 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 18 Apr 2011 21:26:42 +0000 (21:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129721 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 66f8b0bc1f0c2999ec9135b137d4a1b956aa6aec..a8ca949c940ef2b6af204a04731cc60c31e6c09a 100644 (file)
@@ -619,6 +619,12 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
 
     CmdArgs.push_back("-backend-option");
     CmdArgs.push_back("-arm-strict-align");
+
+    // The kext linker doesn't know how to deal with movw/movt.
+#ifndef DISABLE_ARM_DARWIN_USE_MOVT
+    CmdArgs.push_back("-backend-option");
+    CmdArgs.push_back("-arm-darwin-use-movt=0");
+#endif
   }
 }