[cfe-commits] r143304 - in /cfe/trunk: lib/Driver/Driver.cpp lib/Driver/ToolChains.cpp lib/Driver/Tools.cpp test/Driver/cfi.c test/Driver/darwin-as.c
Bob Wilson
bob.wilson at apple.com
Sat Oct 29 17:20:28 PDT 2011
Author: bwilson
Date: Sat Oct 29 19:20:28 2011
New Revision: 143304
URL: http://llvm.org/viewvc/llvm-project?rev=143304&view=rev
Log:
Stop disabling integrated assembler with -static. <rdar://problem/10175391>
The integrated assembler seems to be working pretty well for -static code
now, so remove the hacks to disable it.
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/cfi.c
cfe/trunk/test/Driver/darwin-as.c
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=143304&r1=143303&r2=143304&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Sat Oct 29 19:20:28 2011
@@ -1225,17 +1225,9 @@
// bottom up, so what we are actually looking for is an assembler job with a
// compiler input.
- // FIXME: This doesn't belong here, but ideally we will support static soon
- // anyway.
- bool HasStatic = (C.getArgs().hasArg(options::OPT_mkernel) ||
- C.getArgs().hasArg(options::OPT_static) ||
- C.getArgs().hasArg(options::OPT_fapple_kext));
- bool IsDarwin = TC->getTriple().isOSDarwin();
- bool IsIADefault = TC->IsIntegratedAssemblerDefault() &&
- !(HasStatic && IsDarwin);
if (C.getArgs().hasFlag(options::OPT_integrated_as,
- options::OPT_no_integrated_as,
- IsIADefault) &&
+ options::OPT_no_integrated_as,
+ TC->IsIntegratedAssemblerDefault()) &&
!C.getArgs().hasArg(options::OPT_save_temps) &&
isa<AssembleJobAction>(JA) &&
Inputs->size() == 1 && isa<CompileJobAction>(*Inputs->begin())) {
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=143304&r1=143303&r2=143304&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sat Oct 29 19:20:28 2011
@@ -210,15 +210,9 @@
} else
Key = JA.getKind();
- // FIXME: This doesn't belong here, but ideally we will support static soon
- // anyway.
- bool HasStatic = (C.getArgs().hasArg(options::OPT_mkernel) ||
- C.getArgs().hasArg(options::OPT_static) ||
- C.getArgs().hasArg(options::OPT_fapple_kext));
- bool IsIADefault = IsIntegratedAssemblerDefault() && !HasStatic;
bool UseIntegratedAs = C.getArgs().hasFlag(options::OPT_integrated_as,
options::OPT_no_integrated_as,
- IsIADefault);
+ IsIntegratedAssemblerDefault());
Tool *&T = Tools[Key];
if (!T) {
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=143304&r1=143303&r2=143304&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Oct 29 19:20:28 2011
@@ -1036,17 +1036,9 @@
if (TC.getTriple().isOSDarwin()) {
// The native darwin assembler doesn't support cfi directives, so
// we disable them if we think the .s file will be passed to it.
-
- // FIXME: Duplicated code with ToolChains.cpp
- // FIXME: This doesn't belong here, but ideally we will support static soon
- // anyway.
- bool HasStatic = (Args.hasArg(options::OPT_mkernel) ||
- Args.hasArg(options::OPT_static) ||
- Args.hasArg(options::OPT_fapple_kext));
- bool IsIADefault = TC.IsIntegratedAssemblerDefault() && !HasStatic;
bool UseIntegratedAs = Args.hasFlag(options::OPT_integrated_as,
options::OPT_no_integrated_as,
- IsIADefault);
+ TC.IsIntegratedAssemblerDefault());
bool UseCFI = Args.hasFlag(options::OPT_fdwarf2_cfi_asm,
options::OPT_fno_dwarf2_cfi_asm,
UseIntegratedAs);
Modified: cfe/trunk/test/Driver/cfi.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cfi.c?rev=143304&r1=143303&r2=143304&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cfi.c (original)
+++ cfe/trunk/test/Driver/cfi.c Sat Oct 29 19:20:28 2011
@@ -1,4 +1,5 @@
-// RUN: %clang -ccc-host-triple i386-apple-darwin10 -static -### %s 2>&1 | \
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
+// RUN: -no-integrated-as -### %s 2>&1 | \
// RUN: FileCheck --check-prefix=CHECK-DARWIN %s
// RUN: %clang -ccc-host-triple i386-pc-linux-gnu -static -### %s 2>&1 | \
Modified: cfe/trunk/test/Driver/darwin-as.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-as.c?rev=143304&r1=143303&r2=143304&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-as.c (original)
+++ cfe/trunk/test/Driver/darwin-as.c Sat Oct 29 19:20:28 2011
@@ -1,9 +1,11 @@
-// RUN: %clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s -static -dynamic 2>%t
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s \
+// RUN: -no-integrated-as -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: %clang -ccc-host-triple x86_64-apple-darwin10 -### -x assembler -c %s \
+// RUN: -no-integrated-as -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"
@@ -13,4 +15,3 @@
// RUN: FileCheck -check-prefix=ARMV6 --input-file %t %s
//
// CHECK-ARMV6: as{{(.exe)?}}" "-arch" "armv6" "-o"
-
More information about the cfe-commits
mailing list