diff options
| author | trevyn <230691+trevyn@users.noreply.github.com> | 2024-01-09 01:23:59 +0400 |
|---|---|---|
| committer | trevyn <230691+trevyn@users.noreply.github.com> | 2024-01-09 02:11:00 +0400 |
| commit | 0808cdeb67fa5e0ec24c381e0164eee021b5b1b0 (patch) | |
| tree | cb66c8a4eb0f9b2679ad9ef6da53e66cad444e7c /library/compiler-builtins | |
| parent | 72dbe301ff7ebf19fc01dc790973bc24d8742347 (diff) | |
| download | rust-0808cdeb67fa5e0ec24c381e0164eee021b5b1b0.tar.gz rust-0808cdeb67fa5e0ec24c381e0164eee021b5b1b0.zip | |
build: Allow building C compiler-rt fallbacks for wasm
Diffstat (limited to 'library/compiler-builtins')
4 files changed, 5 insertions, 9 deletions
diff --git a/library/compiler-builtins/.github/workflows/main.yml b/library/compiler-builtins/.github/workflows/main.yml index b69c48c16a9..8110e27f76e 100644 --- a/library/compiler-builtins/.github/workflows/main.yml +++ b/library/compiler-builtins/.github/workflows/main.yml @@ -90,8 +90,8 @@ jobs: - run: rustup component add llvm-tools-preview - name: Download compiler-rt reference sources run: | - curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/12.0-2021-04-15.tar.gz - tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-12.0-2021-04-15/compiler-rt + curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/13.0-2021-08-08.tar.gz + tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-13.0-2021-08-08/compiler-rt echo RUST_COMPILER_RT_ROOT=./compiler-rt >> $GITHUB_ENV shell: bash diff --git a/library/compiler-builtins/build.rs b/library/compiler-builtins/build.rs index 0486116778c..9bf6a254724 100644 --- a/library/compiler-builtins/build.rs +++ b/library/compiler-builtins/build.rs @@ -56,15 +56,10 @@ fn main() { if !cfg!(feature = "mangled-names") && cfg!(feature = "c") { // Don't use a C compiler for these targets: // - // * wasm - clang for wasm is somewhat hard to come by and it's - // unlikely that the C is really that much better than our own Rust. // * nvptx - everything is bitcode, not compatible with mixed C/Rust // * riscv - the rust-lang/rust distribution container doesn't have a C // compiler. - if !target.contains("wasm") - && !target.contains("nvptx") - && (!target.starts_with("riscv") || target.contains("xous")) - { + if !target.contains("nvptx") && (!target.starts_with("riscv") || target.contains("xous")) { #[cfg(feature = "c")] c::compile(&llvm_target, &target); } diff --git a/library/compiler-builtins/ci/docker/wasm32-unknown-unknown/Dockerfile b/library/compiler-builtins/ci/docker/wasm32-unknown-unknown/Dockerfile index 758d94d5013..85ead29aaee 100644 --- a/library/compiler-builtins/ci/docker/wasm32-unknown-unknown/Dockerfile +++ b/library/compiler-builtins/ci/docker/wasm32-unknown-unknown/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:20.04 RUN apt-get update && \ apt-get install -y --no-install-recommends \ - gcc libc6-dev ca-certificates + gcc clang libc6-dev ca-certificates ENV CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=true diff --git a/library/compiler-builtins/ci/run.sh b/library/compiler-builtins/ci/run.sh index 44ec30fb798..6376d2216d9 100755 --- a/library/compiler-builtins/ci/run.sh +++ b/library/compiler-builtins/ci/run.sh @@ -66,6 +66,7 @@ for rlib in $(echo $path); do grep -v __x86.get_pc_thunk | \ grep -v __builtin_cl | \ grep -v __builtin_ctz | \ + grep -v __builtin_sadd_overflow | \ grep 'T __' if test $? = 0; then |
