[cfe-commits] r109074 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/darwin-as.c
Daniel Dunbar
daniel at zuster.org
Wed Jul 21 18:47:22 PDT 2010
Author: ddunbar
Date: Wed Jul 21 20:47:22 2010
New Revision: 109074
URL: http://llvm.org/viewvc/llvm-project?rev=109074&view=rev
Log:
Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/darwin-as.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=109074&r1=109073&r2=109074&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Jul 21 20:47:22 2010
@@ -2229,7 +2229,9 @@
// Derived from asm spec.
AddDarwinArch(Args, CmdArgs);
- if (!getDarwinToolChain().isTargetIPhoneOS() ||
+ // Use -force_cpusubtype_ALL on x86 by default.
+ if (getToolChain().getTriple().getArch() == llvm::Triple::x86 ||
+ getToolChain().getTriple().getArch() == llvm::Triple::x86_64 ||
Args.hasArg(options::OPT_force__cpusubtype__ALL))
CmdArgs.push_back("-force_cpusubtype_ALL");
Modified: cfe/trunk/test/Driver/darwin-as.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-as.c?rev=109074&r1=109073&r2=109074&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-as.c (original)
+++ cfe/trunk/test/Driver/darwin-as.c Wed Jul 21 20:47:22 2010
@@ -1,10 +1,16 @@
// RUN: %clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s -static -dynamic 2>%t
// RUN: FileCheck -check-prefix=STATIC_AND_DYNAMIC-32 --input-file %t %s
-
+//
// CHECK-STATIC_AND_DYNAMIC-32: as{{(.exe)?}}" "-arch" "i386" "-force_cpusubtype_ALL" "-static" "-o"
// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -x assembler -c %s -static 2>%t
// RUN: FileCheck -check-prefix=STATIC-64 --input-file %t %s
-
+//
// CHECK-STATIC-64: as{{(.exe)?}}" "-arch" "x86_64" "-force_cpusubtype_ALL" "-o"
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### \
+// RUN: -arch armv6 -x assembler -c %s 2>%t
+// RUN: FileCheck -check-prefix=ARMV6 --input-file %t %s
+//
+// CHECK-ARMV6: as{{(.exe)?}}" "-arch" "armv6" "-o"
+
More information about the cfe-commits
mailing list