diff options
| author | Brian Anderson <banderson@mozilla.com> | 2015-11-26 19:05:10 +0000 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2016-02-06 20:56:14 +0000 |
| commit | d6c0d859f6d859aa6e418b5ec58246071efbc9de (patch) | |
| tree | 0faba720f79f5047f27173e7173501b104503903 /src/libtest | |
| parent | 34af2de4096b3b1c5d3a5b70171c6e27822aaefb (diff) | |
| download | rust-d6c0d859f6d859aa6e418b5ec58246071efbc9de.tar.gz rust-d6c0d859f6d859aa6e418b5ec58246071efbc9de.zip | |
Add the asmjs-unknown-emscripten triple. Add cfgs to libs.
Backtraces, and the compilation of libbacktrace for asmjs, are disabled. This port doesn't use jemalloc so, like pnacl, it disables jemalloc *for all targets* in the configure file. It disables stack protection.
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 446e9798334..5693cc10a0f 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -928,7 +928,8 @@ fn get_concurrency() -> usize { target_os = "macos", target_os = "ios", target_os = "android", - target_os = "solaris"))] + target_os = "solaris", + target_os = "emscripten"))] fn num_cpus() -> usize { unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize } } @@ -1174,14 +1175,16 @@ impl MetricMap { /// elimination. /// /// This function is a no-op, and does not even read from `dummy`. -#[cfg(not(all(target_os = "nacl", target_arch = "le32")))] +#[cfg(not(any(all(target_os = "nacl", target_arch = "le32"), + target_arch = "asmjs")))] pub fn black_box<T>(dummy: T) -> T { // we need to "use" the argument in some way LLVM can't // introspect. unsafe { asm!("" : : "r"(&dummy)) } dummy } -#[cfg(all(target_os = "nacl", target_arch = "le32"))] +#[cfg(any(all(target_os = "nacl", target_arch = "le32"), + target_arch = "asmjs"))] #[inline(never)] pub fn black_box<T>(dummy: T) -> T { dummy |
