Rename the build/ directory to dist/

This will allow putting all temporary build artifacts in build/ in the
future, keeping all the build output artifacts in dist/
This commit is contained in:
bjorn3 2022-11-28 13:01:49 +00:00
parent a00c7a01da
commit 26d48c9a37
10 changed files with 19 additions and 18 deletions

View File

@ -111,7 +111,7 @@ jobs:
./y.rs test
- name: Package prebuilt cg_clif
run: tar cvfJ cg_clif.tar.xz build
run: tar cvfJ cg_clif.tar.xz dist
- name: Upload prebuilt cg_clif
if: matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
@ -213,7 +213,7 @@ jobs:
- name: Package prebuilt cg_clif
# don't use compression as xzip isn't supported by tar on windows and bzip2 hangs
run: tar cvf cg_clif.tar build
run: tar cvf cg_clif.tar dist
- name: Upload prebuilt cg_clif
uses: actions/upload-artifact@v3

1
.gitignore vendored
View File

@ -14,5 +14,6 @@ perf.data.old
/build_sysroot/sysroot_src
/build_sysroot/compiler-builtins
/build_sysroot/rustc_version
/dist
/rust
/download

View File

@ -37,7 +37,7 @@ Assuming `$cg_clif_dir` is the directory you cloned this repo into and you follo
In the directory with your project (where you can do the usual `cargo build`), run:
```bash
$ $cg_clif_dir/build/cargo-clif build
$ $cg_clif_dir/dist/cargo-clif build
```
This will build your project with rustc_codegen_cranelift instead of the usual LLVM backend.

View File

@ -75,7 +75,7 @@ pub fn main() {
}
};
let mut target_dir = PathBuf::from("build");
let mut target_dir = PathBuf::from("dist");
let mut channel = "release";
let mut sysroot_kind = SysrootKind::Clif;
let mut use_unstable_features = true;

View File

@ -274,7 +274,7 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
eprintln!("[BENCH COMPILE] ebobby/simple-raytracer");
let cargo_clif = env::current_dir()
.unwrap()
.join("build")
.join("dist")
.join(get_wrapper_file_name("cargo-clif", "bin"));
let source_dir = SIMPLE_RAYTRACER.source_dir();
let manifest_path = SIMPLE_RAYTRACER.manifest_path();
@ -503,11 +503,11 @@ impl TestRunner {
target_triple.contains("x86_64") && is_native && !host_triple.contains("windows");
let mut rustc_clif = root_dir.clone();
rustc_clif.push("build");
rustc_clif.push("dist");
rustc_clif.push(get_wrapper_file_name("rustc-clif", "bin"));
let mut rustdoc_clif = root_dir.clone();
rustdoc_clif.push("build");
rustdoc_clif.push("dist");
rustdoc_clif.push(get_wrapper_file_name("rustdoc-clif", "bin"));
let mut rustflags = env::var("RUSTFLAGS").ok().unwrap_or("".to_string());

View File

@ -2,9 +2,9 @@
set -e
rm -rf build_sysroot/{sysroot_src/,target/,compiler-builtins/,rustc_version}
rm -rf target/ build/ perf.data{,.old} y.bin
rm -rf target/ dist/ perf.data{,.old} y.bin
rm -rf download/
# Kept for now in case someone updates their checkout of cg_clif before running clean_all.sh
# FIXME remove at some point in the future
rm -rf rand/ regex/ simple-raytracer/ portable-simd/ abi-checker/ abi-cafe/
rm -rf rand/ regex/ simple-raytracer/ portable-simd/ abi-checker/ abi-cafe/ build/

View File

@ -9,7 +9,7 @@ Assuming `$cg_clif_dir` is the directory you cloned this repo into and you follo
In the directory with your project (where you can do the usual `cargo build`), run:
```bash
$ $cg_clif_dir/build/cargo-clif build
$ $cg_clif_dir/dist/cargo-clif build
```
This will build your project with rustc_codegen_cranelift instead of the usual LLVM backend.
@ -19,7 +19,7 @@ This will build your project with rustc_codegen_cranelift instead of the usual L
> You should prefer using the Cargo method.
```bash
$ $cg_clif_dir/build/rustc-clif my_crate.rs
$ $cg_clif_dir/dist/rustc-clif my_crate.rs
```
## Jit mode
@ -32,20 +32,20 @@ In jit mode cg_clif will immediately execute your code without creating an execu
> The jit mode will probably need cargo integration to make this possible.
```bash
$ $cg_clif_dir/build/cargo-clif jit
$ $cg_clif_dir/dist/cargo-clif jit
```
or
```bash
$ $cg_clif_dir/build/rustc-clif -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic my_crate.rs
$ $cg_clif_dir/dist/rustc-clif -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic my_crate.rs
```
There is also an experimental lazy jit mode. In this mode functions are only compiled once they are
first called.
```bash
$ $cg_clif_dir/build/cargo-clif lazy-jit
$ $cg_clif_dir/dist/cargo-clif lazy-jit
```
## Shell
@ -54,7 +54,7 @@ These are a few functions that allow you to easily run rust code from the shell
```bash
function jit_naked() {
echo "$@" | $cg_clif_dir/build/rustc-clif - -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic
echo "$@" | $cg_clif_dir/dist/rustc-clif - -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic
}
function jit() {

View File

@ -2,7 +2,7 @@
#![forbid(unsafe_code)]/* This line is ignored by bash
# This block is ignored by rustc
pushd $(dirname "$0")/../
RUSTC="$(pwd)/build/rustc-clif"
RUSTC="$(pwd)/dist/rustc-clif"
popd
PROFILE=$1 OUTPUT=$2 exec $RUSTC -Zunstable-options -Cllvm-args=mode=jit -Cprefer-dynamic $0
#*/

View File

@ -36,7 +36,7 @@ changelog-seen = 2
ninja = false
[build]
rustc = "$(pwd)/../build/rustc-clif"
rustc = "$(pwd)/../dist/rustc-clif"
cargo = "$(rustup which cargo)"
full-bootstrap = true
local-rebuild = true

View File

@ -89,7 +89,7 @@ rm src/test/ui/consts/issue-33537.rs # same
# doesn't work due to the way the rustc test suite is invoked.
# should work when using ./x.py test the way it is intended
# ============================================================
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in build/bin/
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
rm -r src/test/run-make/unstable-flag-required # same
rm -r src/test/run-make/rustdoc-* # same
rm -r src/test/run-make/issue-88756-default-output # same