[cfe-commits] r138564 - in /cfe/trunk: lib/Driver/Driver.cpp test/Driver/apple-kext-Xlinker-kext.cpp
Chad Rosier
mcrosier at apple.com
Thu Aug 25 10:33:03 PDT 2011
Author: mcrosier
Date: Thu Aug 25 12:33:03 2011
New Revision: 138564
URL: http://llvm.org/viewvc/llvm-project?rev=138564&view=rev
Log:
[driver] Do not add -kext to the link command line when compiling with
-fapple-kext.
Fixes <rdar://problem/10013310>. Reverts <rdar://problem/7809940>.
Removed:
cfe/trunk/test/Driver/apple-kext-Xlinker-kext.cpp
Modified:
cfe/trunk/lib/Driver/Driver.cpp
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=138564&r1=138563&r2=138564&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Aug 25 12:33:03 2011
@@ -234,23 +234,6 @@
}
#endif
- // If -fapple-kext has been specified, add -kext to linker command if not
- // already done so. Also check to make sure we're actually linking.
- if (Args.hasArg(options::OPT_fapple_kext) && getFinalPhase(*DAL) ==
- phases::Link) {
- bool add_kext = true;
- std::vector<std::string> LinkerArgs =
- Args.getAllArgValues(options::OPT_Xlinker);
- for (std::vector<std::string>::iterator it = LinkerArgs.begin(),
- ie = LinkerArgs.end(); it != ie; it++)
- if (*it == "-kext") {
- add_kext = false;
- break;
- }
- if (add_kext)
- DAL->AddSeparateArg(0, Opts->getOption(options::OPT_Xlinker), "-kext");
- }
-
return DAL;
}
Removed: cfe/trunk/test/Driver/apple-kext-Xlinker-kext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/apple-kext-Xlinker-kext.cpp?rev=138563&view=auto
==============================================================================
--- cfe/trunk/test/Driver/apple-kext-Xlinker-kext.cpp (original)
+++ cfe/trunk/test/Driver/apple-kext-Xlinker-kext.cpp (removed)
@@ -1,15 +0,0 @@
-// When -fapple-kext is specified, make sure we add -kext to the linker command.
-
-// RUN: %clang -### -fapple-kext %s 2> %t1
-// RUN: FileCheck --check-prefix=CHECK1 < %t1 %s
-
-// CHECK1: "-fapple-kext"
-// CHECK1: "-kext"
-
-// RUN: %clang -### -fapple-kext -Xlinker -kext %s 2> %t2
-// RUN: FileCheck --check-prefix=CHECK2 < %t2 %s
-
-// CHECK2: "-fapple-kext"
-// CHECK2: "-kext"
-// CHECK2-NOT: "-kext"
-
More information about the cfe-commits
mailing list