[cfe-commits] r134459 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/gnu-runtime.m
John McCall
rjmccall at apple.com
Tue Jul 5 19:36:31 PDT 2011
Author: rjmccall
Date: Tue Jul 5 21:36:30 2011
New Revision: 134459
URL: http://llvm.org/viewvc/llvm-project?rev=134459&view=rev
Log:
Somehow the -fgnu-runtime option itself got lost in all that shuffling.
Restore it.
Added:
cfe/trunk/test/Driver/gnu-runtime.m
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=134459&r1=134458&r2=134459&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Jul 5 21:36:30 2011
@@ -1772,10 +1772,12 @@
bool NeXTRuntimeIsDefault
= (IsRewriter || getToolChain().getTriple().isOSDarwin());
if (Args.hasFlag(options::OPT_fnext_runtime, options::OPT_fgnu_runtime,
- NeXTRuntimeIsDefault))
+ NeXTRuntimeIsDefault)) {
objCRuntime.setKind(ObjCRuntime::NeXT);
- else
+ } else {
+ CmdArgs.push_back("-fgnu-runtime");
objCRuntime.setKind(ObjCRuntime::GNU);
+ }
getToolChain().configureObjCRuntime(objCRuntime);
if (objCRuntime.HasARC)
CmdArgs.push_back("-fobjc-runtime-has-arc");
Added: cfe/trunk/test/Driver/gnu-runtime.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/gnu-runtime.m?rev=134459&view=auto
==============================================================================
--- cfe/trunk/test/Driver/gnu-runtime.m (added)
+++ cfe/trunk/test/Driver/gnu-runtime.m Tue Jul 5 21:36:30 2011
@@ -0,0 +1,5 @@
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 -### -fsyntax-only -fgnu-runtime %s 2>&1 | FileCheck %s
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 -### -x objective-c++ -fsyntax-only -fgnu-runtime %s 2>&1 | FileCheck %s
+// CHECK: -fgnu-runtime
+// CHECK: -fobjc-runtime-has-arc
+// CHECK: -fobjc-runtime-has-weak
More information about the cfe-commits
mailing list