Driver/Darwin/ld: Eliminate AddDarwinSubArch, our linker invocation is going to
diverge from gcc anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94138 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 5e1d266..857f0d6 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1925,13 +1925,6 @@
}
}
-void darwin::DarwinTool::AddDarwinSubArch(const ArgList &Args,
- ArgStringList &CmdArgs) const {
- // Derived from darwin_subarch spec, not sure what the distinction
- // exists for but at least for this chain it is the same.
- AddDarwinArch(Args, CmdArgs);
-}
-
void darwin::Link::AddLinkArgs(const ArgList &Args,
ArgStringList &CmdArgs) const {
const Driver &D = getToolChain().getDriver();
@@ -1946,11 +1939,10 @@
}
if (!Args.hasArg(options::OPT_dynamiclib)) {
- if (Args.hasArg(options::OPT_force__cpusubtype__ALL)) {
- AddDarwinArch(Args, CmdArgs);
- CmdArgs.push_back("-force_cpusubtype_ALL");
- } else
- AddDarwinSubArch(Args, CmdArgs);
+ AddDarwinArch(Args, CmdArgs);
+
+ // FIXME: Why do this only on this path?
+ CmdArgs.push_back("-force_cpusubtype_ALL");
Args.AddLastArg(CmdArgs, options::OPT_bundle);
Args.AddAllArgs(CmdArgs, options::OPT_bundle__loader);
@@ -1984,11 +1976,7 @@
Args.AddAllArgsTranslated(CmdArgs, options::OPT_current__version,
"-dylib_current_version");
- if (Args.hasArg(options::OPT_force__cpusubtype__ALL)) {
- AddDarwinArch(Args, CmdArgs);
- // NOTE: We don't add -force_cpusubtype_ALL on this path. Ok.
- } else
- AddDarwinSubArch(Args, CmdArgs);
+ AddDarwinArch(Args, CmdArgs);
Args.AddAllArgsTranslated(CmdArgs, options::OPT_install__name,
"-dylib_install_name");