File tree 3 files changed +16
-6
lines changed
3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ on: [push, pull_request]
4
4
env :
5
5
RUSTDOCFLAGS : -Dwarnings
6
6
RUSTFLAGS : -Dwarnings
7
- RUST_LLVM_VERSION : 20.1-2025-02-13
8
7
RUST_COMPILER_RT_ROOT : ./compiler-rt
9
8
10
9
jobs :
@@ -129,12 +128,10 @@ jobs:
129
128
uses : actions/cache@v4
130
129
with :
131
130
path : compiler-rt
132
- key : ${{ runner.os }}-compiler-rt-${{ env.RUST_LLVM_VERSION }}
131
+ key : ${{ runner.os }}-compiler-rt-${{ hashFiles('ci/download-compiler-rt.sh') }}
133
132
- name : Download compiler-rt reference sources
134
133
if : steps.cache-compiler-rt.outputs.cache-hit != 'true'
135
- run : |
136
- curl -L -o code.tar.gz "https://github.com/rust-lang/llvm-project/archive/rustc/${RUST_LLVM_VERSION}.tar.gz"
137
- tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-${RUST_LLVM_VERSION}/compiler-rt
134
+ run : ./ci/download-compiler-rt.sh
138
135
shell : bash
139
136
140
137
# Non-linux tests just use our raw script
Original file line number Diff line number Diff line change @@ -619,7 +619,10 @@ mod c {
619
619
let root = match env:: var_os ( "RUST_COMPILER_RT_ROOT" ) {
620
620
Some ( s) => PathBuf :: from ( s) ,
621
621
None => {
622
- panic ! ( "RUST_COMPILER_RT_ROOT is not set. You may need to download compiler-rt." )
622
+ panic ! (
623
+ "RUST_COMPILER_RT_ROOT is not set. You may need to run \
624
+ `ci/download-compiler-rt.sh`."
625
+ ) ;
623
626
}
624
627
} ;
625
628
if !root. exists ( ) {
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Download sources to build C versions of intrinsics. Once being run,
3
+ # `RUST_COMPILER_RT_ROOT` must be set.
4
+
5
+ set -eux
6
+
7
+ rust_llvm_version=20.1-2025-02-13
8
+
9
+ curl -L -o code.tar.gz " https://github.com/rust-lang/llvm-project/archive/rustc/${rust_llvm_version} .tar.gz"
10
+ tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-${rust_llvm_version} /compiler-rt
You can’t perform that action at this time.
0 commit comments