Author: sbc Date: Tue Aug 7 11:55:41 2018 New Revision: 339163 URL: http://llvm.org/viewvc/llvm-project?rev=339163&view=rev Log: [WebAssembly] Remove use of lld -flavor flag
This flag is deprecated. The preferred way to select the lld flavor is by calling it by one of its aliases. Differential Revision: https://reviews.llvm.org/D50395 Modified: cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp cfe/trunk/lib/Driver/ToolChains/WebAssembly.h cfe/trunk/test/Driver/wasm-toolchain.c cfe/trunk/test/Driver/wasm-toolchain.cpp Modified: cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp?rev=339163&r1=339162&r2=339163&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp Tue Aug 7 11:55:41 2018 @@ -41,8 +41,6 @@ void wasm::Linker::ConstructJob(Compilat const ToolChain &ToolChain = getToolChain(); const char *Linker = Args.MakeArgString(ToolChain.GetLinkerPath()); ArgStringList CmdArgs; - CmdArgs.push_back("-flavor"); - CmdArgs.push_back("wasm"); if (Args.hasArg(options::OPT_s)) CmdArgs.push_back("--strip-all"); Modified: cfe/trunk/lib/Driver/ToolChains/WebAssembly.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/WebAssembly.h?rev=339163&r1=339162&r2=339163&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/WebAssembly.h (original) +++ cfe/trunk/lib/Driver/ToolChains/WebAssembly.h Tue Aug 7 11:55:41 2018 @@ -66,9 +66,7 @@ private: llvm::opt::ArgStringList &CmdArgs) const override; std::string getThreadModel() const override; - const char *getDefaultLinker() const override { - return "lld"; - } + const char *getDefaultLinker() const override { return "wasm-ld"; } Tool *buildLinker() const override; }; Modified: cfe/trunk/test/Driver/wasm-toolchain.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/wasm-toolchain.c?rev=339163&r1=339162&r2=339163&view=diff ============================================================================== --- cfe/trunk/test/Driver/wasm-toolchain.c (original) +++ cfe/trunk/test/Driver/wasm-toolchain.c Tue Aug 7 11:55:41 2018 @@ -12,12 +12,12 @@ // A basic C link command-line. -// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo -fuse-ld=lld %s 2>&1 | FileCheck -check-prefix=LINK %s +// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo -fuse-ld=wasm-ld %s 2>&1 | FileCheck -check-prefix=LINK %s // LINK: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]" -// LINK: lld{{.*}}" "-flavor" "wasm" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" +// LINK: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" // A basic C link command-line with optimization. -// RUN: %clang -### -O2 -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo -fuse-ld=lld %s 2>&1 | FileCheck -check-prefix=LINK_OPT %s +// RUN: %clang -### -O2 -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo -fuse-ld=wasm-ld %s 2>&1 | FileCheck -check-prefix=LINK_OPT %s // LINK_OPT: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]" -// LINK_OPT: lld{{.*}}" "-flavor" "wasm" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" +// LINK_OPT: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" Modified: cfe/trunk/test/Driver/wasm-toolchain.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/wasm-toolchain.cpp?rev=339163&r1=339162&r2=339163&view=diff ============================================================================== --- cfe/trunk/test/Driver/wasm-toolchain.cpp (original) +++ cfe/trunk/test/Driver/wasm-toolchain.cpp Tue Aug 7 11:55:41 2018 @@ -12,12 +12,12 @@ // A basic C++ link command-line. -// RUN: %clangxx -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo --stdlib=c++ -fuse-ld=lld %s 2>&1 | FileCheck -check-prefix=LINK %s +// RUN: %clangxx -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo --stdlib=c++ -fuse-ld=wasm-ld %s 2>&1 | FileCheck -check-prefix=LINK %s // LINK: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]" -// LINK: lld{{.*}}" "-flavor" "wasm" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" +// LINK: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" // A basic C++ link command-line with optimization. -// RUN: %clangxx -### -O2 -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s --stdlib=c++ -fuse-ld=lld 2>&1 | FileCheck -check-prefix=LINK_OPT %s +// RUN: %clangxx -### -O2 -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s --stdlib=c++ -fuse-ld=wasm-ld 2>&1 | FileCheck -check-prefix=LINK_OPT %s // LINK_OPT: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]" -// LINK_OPT: lld{{.*}}" "-flavor" "wasm" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" +// LINK_OPT: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits