[WebAssembly] Remove the -target command-line flag from the ld commandline.

This flag isn't needed, or permitted, with the "ld" flavor of lld.

Also, add a basic ld commandline test.

llvm-svn: 256216
This commit is contained in:
Dan Gohman 2015-12-21 23:30:41 +00:00
parent 3f79e32593
commit f4b4e08db0
2 changed files with 3 additions and 2 deletions

View File

@ -6516,8 +6516,6 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA,
ArgStringList CmdArgs;
CmdArgs.push_back("-flavor");
CmdArgs.push_back("ld");
CmdArgs.push_back("-target");
CmdArgs.push_back(Args.MakeArgString(getToolChain().getTripleString()));
AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());

View File

@ -0,0 +1,3 @@
// RUN: %clang -### -target wasm32-unknown-unknown -x assembler %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
// AS_LINK: clang{{.*}}" "-cc1as" {{.*}} "-o" "[[temp:[^"]*]]"
// AS_LINK: lld" "-flavor" "ld" "[[temp]]" "-o" "a.out"