[cfe-commits] r131084 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/darwin-ld.c
Daniel Dunbar
daniel at zuster.org
Mon May 9 10:23:16 PDT 2011
Author: ddunbar
Date: Mon May 9 12:23:16 2011
New Revision: 131084
URL: http://llvm.org/viewvc/llvm-project?rev=131084&view=rev
Log:
Driver/Darwin: Put dsymutil -o arguments first, so that dysmutil doesn't barf
when POSIXLY_COMPLIANT is set.
- Patch by Dave Vasilevsky!
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/darwin-ld.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=131084&r1=131083&r2=131084&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon May 9 12:23:16 2011
@@ -3166,14 +3166,14 @@
const char *LinkingOutput) const {
ArgStringList CmdArgs;
+ CmdArgs.push_back("-o");
+ CmdArgs.push_back(Output.getFilename());
+
assert(Inputs.size() == 1 && "Unable to handle multiple inputs.");
const InputInfo &Input = Inputs[0];
assert(Input.isFilename() && "Unexpected dsymutil input.");
CmdArgs.push_back(Input.getFilename());
- CmdArgs.push_back("-o");
- CmdArgs.push_back(Output.getFilename());
-
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath("dsymutil"));
C.addCommand(new Command(JA, *this, Exec, CmdArgs));
Modified: cfe/trunk/test/Driver/darwin-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-ld.c?rev=131084&r1=131083&r2=131084&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-ld.c (original)
+++ cfe/trunk/test/Driver/darwin-ld.c Mon May 9 12:23:16 2011
@@ -5,9 +5,9 @@
// Make sure we run dsymutil on source input files.
// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -g %s -o BAR 2> %t.log
-// RUN: grep '".*dsymutil" "BAR"' %t.log
+// RUN: grep '".*dsymutil" "-o" "BAR.dSYM" "BAR"' %t.log
// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -g -filelist FOO %s -o BAR 2> %t.log
-// RUN: grep '".*dsymutil" "BAR"' %t.log
+// RUN: grep '".*dsymutil" "-o" "BAR.dSYM" "BAR"' %t.log
// Splatter test case. This is gross, but it works for now. For the
// driver, just getting coverage of the tool code and checking the
More information about the cfe-commits
mailing list