Driver/Darwin: Disable movw/movt with -mkernel or -fapple-kext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129721 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 66f8b0b..a8ca949 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -619,6 +619,12 @@
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
}
}