From f73d5f23a889b93d89ddef61ac0995df40286bb8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 11 May 2014 18:26:10 +0000 Subject: Vendor import of clang RELEASE_34/dot1-final tag r208032 (effectively, 3.4.1 release): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_34/dot1-final@208032 --- lib/Driver/Tools.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'lib/Driver/Tools.cpp') diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 29713ed1b4ce9..b013eb510c4e2 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1995,13 +1995,6 @@ static void SplitDebugInfo(const ToolChain &TC, Compilation &C, C.addCommand(new Command(JA, T, Exec, StripArgs)); } -static bool isOptimizationLevelFast(const ArgList &Args) { - if (Arg *A = Args.getLastArg(options::OPT_O_Group)) - if (A->getOption().matches(options::OPT_Ofast)) - return true; - return false; -} - /// \brief Vectorize at all optimization levels greater than 1 except for -Oz. static bool shouldEnableVectorizerAtOLevel(const ArgList &Args) { if (Arg *A = Args.getLastArg(options::OPT_O_Group)) { @@ -4611,8 +4604,14 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA, // If -no_integrated_as is used add -Q to the darwin assember driver to make // sure it runs its system assembler not clang's integrated assembler. - if (Args.hasArg(options::OPT_no_integrated_as)) - CmdArgs.push_back("-Q"); + // Applicable to darwin11+ and Xcode 4+. darwin<10 lacked integrated-as. + // FIXME: at run-time detect assembler capabilities or rely on version + // information forwarded by -target-assembler-version (future) + if (Args.hasArg(options::OPT_no_integrated_as)) { + const llvm::Triple& t(getToolChain().getTriple()); + if (!(t.isMacOSX() && t.isMacOSXVersionLT(10, 7))) + CmdArgs.push_back("-Q"); + } // Forward -g, assuming we are dealing with an actual assembly file. if (SourceAction->getType() == types::TY_Asm || -- cgit v1.2.3