Don't run dsymutil when making a fat executable direct source.
- Otherwise, we will end up with stray .dSYM files which don't get
lipo'ed or removed.
- Ideally we would run dsymutil on the result, but we don't have the
infrastructure for that yet. Note that gcc doesn't handle this case
either.
- <rdar://problem/6809621> [driver] clang leaves .dSYM files lying
around in tmp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69951 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index c37517e..8393e9c 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1619,7 +1619,13 @@
}
}
- if (Args.getLastArg(options::OPT_g_Group) &&
+ // 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