mirror of https://github.com/microsoft/clang.git
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60e8df47a8
commit
cf2a587af9
|
@ -41,8 +41,6 @@ void wasm::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
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");
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue