diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-04 18:28:41 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-04 18:28:41 +0000 |
commit | be1cc3eec682ca73361edb4109a7969452d3dbeb (patch) | |
tree | db2ff22c520192b2b02fda57c0b891276123e2f3 /lib/Driver/Tools.cpp | |
parent | 6e0f25483b1a801cd1155ea89c2b725feab16332 (diff) |
Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 518debce93..78f2d70073 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2215,26 +2215,6 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA, Dest.addCommand(new Command(JA, *this, Exec, CmdArgs)); } -/// Helper routine for seeing if we should use dsymutil; this is a -/// gcc compatible hack, we should remove it and use the input -/// type information. -static bool isSourceSuffix(const char *Str) { - // match: 'C', 'CPP', 'c', 'cc', 'cp', 'c++', 'cpp', 'cxx', 'm', - // 'mm'. - return llvm::StringSwitch<bool>(Str) - .Case("C", true) - .Case("c", true) - .Case("m", true) - .Case("cc", true) - .Case("cp", true) - .Case("mm", true) - .Case("CPP", true) - .Case("c++", true) - .Case("cpp", true) - .Case("cxx", true) - .Default(false); -} - void darwin::DarwinTool::AddDarwinArch(const ArgList &Args, ArgStringList &CmdArgs) const { llvm::StringRef ArchName = getDarwinToolChain().getDarwinArchName(Args); @@ -2555,28 +2535,6 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, break; } } - - // Run dsymutil if we are making an executable in a single step. - // - // FIXME: Currently we don't want to do this when we are part of a - // universal build step, as this would end up creating stray temp - // files. - if (!LinkingOutput && - Args.getLastArg(options::OPT_g_Group) && - !Args.getLastArg(options::OPT_gstabs) && - !Args.getLastArg(options::OPT_g0)) { - // FIXME: This is gross, but matches gcc. The test only considers - // the suffix (not the -x type), and then only of the first - // source input. Awesome. - const char *Suffix = strrchr(BaseInput, '.'); - if (Suffix && isSourceSuffix(Suffix + 1)) { - const char *Exec = - Args.MakeArgString(getToolChain().GetProgramPath(C, "dsymutil")); - ArgStringList CmdArgs; - CmdArgs.push_back(Output.getFilename()); - C.getJobs().addCommand(new Command(JA, *this, Exec, CmdArgs)); - } - } } void darwin::Lipo::ConstructJob(Compilation &C, const JobAction &JA, |