Merge commit '6d355f6844323db03bfd608899613e363e701951' into sync_cg_clif-2023-12-31
This commit is contained in:
parent
6b1a3ad4a6
commit
0cfbc47b9a
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -175,14 +175,10 @@ jobs:
|
|||||||
path: build/cg_clif
|
path: build/cg_clif
|
||||||
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
|
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Cache cargo bin dir
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.cargo/bin
|
|
||||||
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-bin-dir-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Install hyperfine
|
- name: Install hyperfine
|
||||||
run: cargo install hyperfine || true
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y hyperfine
|
||||||
|
|
||||||
- name: Prepare dependencies
|
- name: Prepare dependencies
|
||||||
run: ./y.sh prepare
|
run: ./y.sh prepare
|
||||||
@ -257,14 +253,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload prebuilt cg_clif
|
- name: Upload prebuilt cg_clif
|
||||||
if: matrix.os == 'windows-latest' || matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
|
if: matrix.os == 'windows-latest' || matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cg_clif-${{ matrix.env.TARGET_TRIPLE }}
|
name: cg_clif-${{ matrix.env.TARGET_TRIPLE }}
|
||||||
path: cg_clif.tar.xz
|
path: cg_clif.tar.xz
|
||||||
|
|
||||||
- name: Upload prebuilt cg_clif (cross compile)
|
- name: Upload prebuilt cg_clif (cross compile)
|
||||||
if: matrix.os != 'windows-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
|
if: matrix.os != 'windows-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cg_clif-${{ runner.os }}-cross-x86_64-mingw
|
name: cg_clif-${{ runner.os }}-cross-x86_64-mingw
|
||||||
path: cg_clif.tar.xz
|
path: cg_clif.tar.xz
|
||||||
@ -283,7 +279,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Download all built artifacts
|
- name: Download all built artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
|
|
||||||
|
5
.github/workflows/rustc.yml
vendored
5
.github/workflows/rustc.yml
vendored
@ -43,6 +43,11 @@ jobs:
|
|||||||
path: build/cg_clif
|
path: build/cg_clif
|
||||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
|
||||||
|
|
||||||
|
- name: Install ripgrep
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y ripgrep
|
||||||
|
|
||||||
- name: Prepare dependencies
|
- name: Prepare dependencies
|
||||||
run: ./y.sh prepare
|
run: ./y.sh prepare
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2023-12-24"
|
channel = "nightly-2023-12-31"
|
||||||
components = ["rust-src", "rustc-dev", "llvm-tools"]
|
components = ["rust-src", "rustc-dev", "llvm-tools"]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# CG_CLIF_FORCE_GNU_AS will force usage of as instead of the LLVM backend of rustc as we
|
# CG_CLIF_FORCE_GNU_AS will force usage of as instead of the LLVM backend of rustc as
|
||||||
# the LLVM backend isn't compiled in here.
|
# the LLVM backend isn't compiled in here.
|
||||||
export CG_CLIF_FORCE_GNU_AS=1
|
export CG_CLIF_FORCE_GNU_AS=1
|
||||||
|
|
||||||
@ -11,20 +11,19 @@ export CG_CLIF_FORCE_GNU_AS=1
|
|||||||
CG_CLIF_STDLIB_REMAP_PATH_PREFIX=/rustc/FAKE_PREFIX ./y.sh build
|
CG_CLIF_STDLIB_REMAP_PATH_PREFIX=/rustc/FAKE_PREFIX ./y.sh build
|
||||||
|
|
||||||
echo "[SETUP] Rust fork"
|
echo "[SETUP] Rust fork"
|
||||||
git clone https://github.com/rust-lang/rust.git --filter=tree:0 || true
|
git clone --quiet https://github.com/rust-lang/rust.git --filter=tree:0 || true
|
||||||
pushd rust
|
pushd rust
|
||||||
git fetch
|
git fetch
|
||||||
git checkout -- .
|
git checkout --no-progress -- .
|
||||||
git checkout "$(rustc -V | cut -d' ' -f3 | tr -d '(')"
|
git checkout --no-progress "$(rustc -V | cut -d' ' -f3 | tr -d '(')"
|
||||||
|
|
||||||
|
git submodule update --quiet --init src/tools/cargo library/backtrace library/stdarch
|
||||||
|
|
||||||
git -c user.name=Dummy -c user.email=dummy@example.com -c commit.gpgSign=false \
|
git -c user.name=Dummy -c user.email=dummy@example.com -c commit.gpgSign=false \
|
||||||
am ../patches/*-stdlib-*.patch
|
am ../patches/*-stdlib-*.patch
|
||||||
|
|
||||||
cat > config.toml <<EOF
|
cat > config.toml <<EOF
|
||||||
change-id = 115898
|
change-id = 999999
|
||||||
|
|
||||||
[llvm]
|
|
||||||
ninja = false
|
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
rustc = "$(pwd)/../dist/bin/rustc-clif"
|
rustc = "$(pwd)/../dist/bin/rustc-clif"
|
||||||
|
@ -321,7 +321,7 @@ fn dep_symbol_lookup_fn(
|
|||||||
Linkage::NotLinked | Linkage::IncludedFromDylib => {}
|
Linkage::NotLinked | Linkage::IncludedFromDylib => {}
|
||||||
Linkage::Static => {
|
Linkage::Static => {
|
||||||
let name = crate_info.crate_name[&cnum];
|
let name = crate_info.crate_name[&cnum];
|
||||||
let mut err = sess.struct_err(format!("Can't load static lib {}", name));
|
let mut err = sess.dcx().struct_err(format!("Can't load static lib {}", name));
|
||||||
err.note("rustc_codegen_cranelift can only load dylibs in JIT mode.");
|
err.note("rustc_codegen_cranelift can only load dylibs in JIT mode.");
|
||||||
err.emit();
|
err.emit();
|
||||||
}
|
}
|
||||||
|
@ -154,6 +154,8 @@ pub(crate) fn compile_global_asm(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let mut child = Command::new(std::env::current_exe().unwrap())
|
let mut child = Command::new(std::env::current_exe().unwrap())
|
||||||
|
// Avoid a warning about the jobserver fd not being passed
|
||||||
|
.env_remove("CARGO_MAKEFLAGS")
|
||||||
.arg("--target")
|
.arg("--target")
|
||||||
.arg(&config.target)
|
.arg(&config.target)
|
||||||
.arg("--crate-type")
|
.arg("--crate-type")
|
||||||
|
Loading…
Reference in New Issue
Block a user