From: Dan Gohman Date: Mon, 21 Dec 2015 23:30:41 +0000 (+0000) Subject: [WebAssembly] Remove the -target command-line flag from the ld commandline. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a216e5249413904c583387a15ab47853a9adbe6f;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256216 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 5457028677..efba28cfb5 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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()); diff --git a/test/Driver/wasm-toolchain.c b/test/Driver/wasm-toolchain.c new file mode 100644 index 0000000000..6e3d84ce1d --- /dev/null +++ b/test/Driver/wasm-toolchain.c @@ -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"