Migrate wasm-override-linker
to rmake
This commit is contained in:
parent
56fe015d4a
commit
189232bc42
@ -187,5 +187,4 @@ run-make/translation/Makefile
|
||||
run-make/type-mismatch-same-crate-name/Makefile
|
||||
run-make/unstable-flag-required/Makefile
|
||||
run-make/wasm-exceptions-nostd/Makefile
|
||||
run-make/wasm-override-linker/Makefile
|
||||
run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile
|
||||
|
@ -1,16 +0,0 @@
|
||||
# needs-force-clang-based-tests
|
||||
|
||||
# FIXME(#126180): This test doesn't actually run anywhere, because the only
|
||||
# CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
|
||||
|
||||
include ../tools.mk
|
||||
|
||||
ifeq ($(TARGET),wasm32-unknown-unknown)
|
||||
all:
|
||||
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
|
||||
else ifeq ($(TARGET),wasm64-unknown-unknown)
|
||||
all:
|
||||
$(RUSTC) foo.rs --crate-type cdylib --target $(TARGET) -C linker=$(CLANG)
|
||||
else
|
||||
all:
|
||||
endif
|
17
tests/run-make/wasm-override-linker/rmake.rs
Normal file
17
tests/run-make/wasm-override-linker/rmake.rs
Normal file
@ -0,0 +1,17 @@
|
||||
// How to run this
|
||||
// $ RUSTBUILD_FORCE_CLANG_BASED_TESTS=1 ./x.py test tests/run-make/wasm-override-linker/
|
||||
|
||||
//@ needs-force-clang-based-tests
|
||||
|
||||
use run_make_support::{env_var, rustc, target};
|
||||
|
||||
fn main() {
|
||||
if matches!(target().as_str(), "wasm32-unknown-unknown" | "wasm64-unknown-unknown") {
|
||||
rustc()
|
||||
.input("foo.rs")
|
||||
.crate_type("cdylib")
|
||||
.target(&target())
|
||||
.linker(&env_var("CLANG"))
|
||||
.run();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user