Link in the right places and correct -Xlinker.

Swift SVN r22621
This commit is contained in:
Graham Batty
2014-10-09 16:03:48 +00:00
parent 587c818c5b
commit 4968d8f6fd
3 changed files with 22 additions and 3 deletions

View File

@@ -627,8 +627,7 @@ Job *linux::Linker::constructJob(const JobAction &JA,
case LinkKind::None:
llvm_unreachable("invalid link kind");
case LinkKind::Executable:
Arguments.push_back("-lpthread");
Arguments.push_back("-ldl");
// Default case, nothing extra needed
break;
case LinkKind::DynamicLibrary:
Arguments.push_back("-shared");
@@ -638,7 +637,7 @@ Job *linux::Linker::constructJob(const JobAction &JA,
addPrimaryInputsOfType(Arguments, Inputs.get(), types::TY_Object);
addInputsOfType(Arguments, InputActions, types::TY_Object);
Args.AddAllArgValues(Arguments, options::OPT_Xlinker);
Args.AddAllArgs(Arguments, options::OPT_Xlinker);
Args.AddAllArgs(Arguments, options::OPT_linker_option_Group);
Args.AddAllArgs(Arguments, options::OPT_F);