forked from OSchip/llvm-project
PR4766: Don't pass -static to 'as' on x86_64 on Darwin.
Also, do pass -static even with -dynamic on i386. llvm-svn: 79948
This commit is contained in:
parent
7c07d5fed8
commit
a6b4a3d646
|
@ -1277,10 +1277,10 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back(Args.MakeArgString(getToolChain().getArchName().c_str()));
|
||||
|
||||
CmdArgs.push_back("-force_cpusubtype_ALL");
|
||||
if ((Args.hasArg(options::OPT_mkernel) ||
|
||||
if (getToolChain().getTriple().getArch() != llvm::Triple::x86_64 &&
|
||||
(Args.hasArg(options::OPT_mkernel) ||
|
||||
Args.hasArg(options::OPT_static) ||
|
||||
Args.hasArg(options::OPT_fapple_kext)) &&
|
||||
!Args.hasArg(options::OPT_dynamic))
|
||||
Args.hasArg(options::OPT_fapple_kext)))
|
||||
CmdArgs.push_back("-static");
|
||||
|
||||
Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// RUN: clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s -static -dynamic 2>%t &&
|
||||
// RUN: FileCheck -check-prefix=STATIC_AND_DYNAMIC-32 --input-file %t %s
|
||||
|
||||
// CHECK-STATIC_AND_DYNAMIC-32: as" "-arch" "i386" "-force_cpusubtype_ALL" "-static" "-o"
|
||||
|
||||
// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -x assembler -c %s -static 2>%t &&
|
||||
// RUN: FileCheck -check-prefix=STATIC-64 --input-file %t %s
|
||||
|
||||
// CHECK-STATIC-64: as" "-arch" "x86_64" "-force_cpusubtype_ALL" "-o"
|
||||
|
Loading…
Reference in New Issue