Skip to content

Commit 5e60924

Browse files
authored
Merge pull request rust-lang#18 from malbarbo/emscripten
Add support to emscripten targets
2 parents ff359da + 5015a6b commit 5e60924

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ctest/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ctest"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
authors = ["Alex Crichton <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"

ctest/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,10 @@ fn default_cfg(target: &str) -> Vec<(String, Option<String>)> {
769769
("s390x", "64")
770770
} else if target.starts_with("sparc64") {
771771
("sparc64", "64")
772+
} else if target.starts_with("asmjs") {
773+
("asmjs", "32")
774+
} else if target.starts_with("wasm32") {
775+
("wasm32", "32")
772776
} else {
773777
panic!("unknown arch/pointer width: {}", target)
774778
};
@@ -796,6 +800,8 @@ fn default_cfg(target: &str) -> Vec<(String, Option<String>)> {
796800
("openbsd", "unix", "")
797801
} else if target.contains("dragonfly") {
798802
("dragonfly", "unix", "")
803+
} else if target.contains("emscripten") {
804+
("emscripten", "unix", "")
799805
} else {
800806
panic!("unknown os/family width: {}", target)
801807
};

0 commit comments

Comments
 (0)