Skip to content

Commit 26d48c9

Browse files
committed
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/
1 parent a00c7a0 commit 26d48c9

File tree

10 files changed

+19
-18
lines changed

10 files changed

+19
-18
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
./y.rs test
112112
113113
- name: Package prebuilt cg_clif
114-
run: tar cvfJ cg_clif.tar.xz build
114+
run: tar cvfJ cg_clif.tar.xz dist
115115

116116
- name: Upload prebuilt cg_clif
117117
if: matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
@@ -213,7 +213,7 @@ jobs:
213213
214214
- name: Package prebuilt cg_clif
215215
# don't use compression as xzip isn't supported by tar on windows and bzip2 hangs
216-
run: tar cvf cg_clif.tar build
216+
run: tar cvf cg_clif.tar dist
217217

218218
- name: Upload prebuilt cg_clif
219219
uses: actions/upload-artifact@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ perf.data.old
1414
/build_sysroot/sysroot_src
1515
/build_sysroot/compiler-builtins
1616
/build_sysroot/rustc_version
17+
/dist
1718
/rust
1819
/download

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Assuming `$cg_clif_dir` is the directory you cloned this repo into and you follo
3737
In the directory with your project (where you can do the usual `cargo build`), run:
3838

3939
```bash
40-
$ $cg_clif_dir/build/cargo-clif build
40+
$ $cg_clif_dir/dist/cargo-clif build
4141
```
4242

4343
This will build your project with rustc_codegen_cranelift instead of the usual LLVM backend.

build_system/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub fn main() {
7575
}
7676
};
7777

78-
let mut target_dir = PathBuf::from("build");
78+
let mut target_dir = PathBuf::from("dist");
7979
let mut channel = "release";
8080
let mut sysroot_kind = SysrootKind::Clif;
8181
let mut use_unstable_features = true;

build_system/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
274274
eprintln!("[BENCH COMPILE] ebobby/simple-raytracer");
275275
let cargo_clif = env::current_dir()
276276
.unwrap()
277-
.join("build")
277+
.join("dist")
278278
.join(get_wrapper_file_name("cargo-clif", "bin"));
279279
let source_dir = SIMPLE_RAYTRACER.source_dir();
280280
let manifest_path = SIMPLE_RAYTRACER.manifest_path();
@@ -503,11 +503,11 @@ impl TestRunner {
503503
target_triple.contains("x86_64") && is_native && !host_triple.contains("windows");
504504

505505
let mut rustc_clif = root_dir.clone();
506-
rustc_clif.push("build");
506+
rustc_clif.push("dist");
507507
rustc_clif.push(get_wrapper_file_name("rustc-clif", "bin"));
508508

509509
let mut rustdoc_clif = root_dir.clone();
510-
rustdoc_clif.push("build");
510+
rustdoc_clif.push("dist");
511511
rustdoc_clif.push(get_wrapper_file_name("rustdoc-clif", "bin"));
512512

513513
let mut rustflags = env::var("RUSTFLAGS").ok().unwrap_or("".to_string());

clean_all.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
set -e
33

44
rm -rf build_sysroot/{sysroot_src/,target/,compiler-builtins/,rustc_version}
5-
rm -rf target/ build/ perf.data{,.old} y.bin
5+
rm -rf target/ dist/ perf.data{,.old} y.bin
66
rm -rf download/
77

88
# Kept for now in case someone updates their checkout of cg_clif before running clean_all.sh
99
# FIXME remove at some point in the future
10-
rm -rf rand/ regex/ simple-raytracer/ portable-simd/ abi-checker/ abi-cafe/
10+
rm -rf rand/ regex/ simple-raytracer/ portable-simd/ abi-checker/ abi-cafe/ build/

docs/usage.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Assuming `$cg_clif_dir` is the directory you cloned this repo into and you follo
99
In the directory with your project (where you can do the usual `cargo build`), run:
1010

1111
```bash
12-
$ $cg_clif_dir/build/cargo-clif build
12+
$ $cg_clif_dir/dist/cargo-clif build
1313
```
1414

1515
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
1919
> You should prefer using the Cargo method.
2020
2121
```bash
22-
$ $cg_clif_dir/build/rustc-clif my_crate.rs
22+
$ $cg_clif_dir/dist/rustc-clif my_crate.rs
2323
```
2424

2525
## Jit mode
@@ -32,20 +32,20 @@ In jit mode cg_clif will immediately execute your code without creating an execu
3232
> The jit mode will probably need cargo integration to make this possible.
3333
3434
```bash
35-
$ $cg_clif_dir/build/cargo-clif jit
35+
$ $cg_clif_dir/dist/cargo-clif jit
3636
```
3737

3838
or
3939

4040
```bash
41-
$ $cg_clif_dir/build/rustc-clif -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic my_crate.rs
41+
$ $cg_clif_dir/dist/rustc-clif -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic my_crate.rs
4242
```
4343

4444
There is also an experimental lazy jit mode. In this mode functions are only compiled once they are
4545
first called.
4646

4747
```bash
48-
$ $cg_clif_dir/build/cargo-clif lazy-jit
48+
$ $cg_clif_dir/dist/cargo-clif lazy-jit
4949
```
5050

5151
## Shell
@@ -54,7 +54,7 @@ These are a few functions that allow you to easily run rust code from the shell
5454

5555
```bash
5656
function jit_naked() {
57-
echo "$@" | $cg_clif_dir/build/rustc-clif - -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic
57+
echo "$@" | $cg_clif_dir/dist/rustc-clif - -Zunstable-features -Cllvm-args=mode=jit -Cprefer-dynamic
5858
}
5959

6060
function jit() {

scripts/filter_profile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![forbid(unsafe_code)]/* This line is ignored by bash
33
# This block is ignored by rustc
44
pushd $(dirname "$0")/../
5-
RUSTC="$(pwd)/build/rustc-clif"
5+
RUSTC="$(pwd)/dist/rustc-clif"
66
popd
77
PROFILE=$1 OUTPUT=$2 exec $RUSTC -Zunstable-options -Cllvm-args=mode=jit -Cprefer-dynamic $0
88
#*/

scripts/setup_rust_fork.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ changelog-seen = 2
3636
ninja = false
3737
3838
[build]
39-
rustc = "$(pwd)/../build/rustc-clif"
39+
rustc = "$(pwd)/../dist/rustc-clif"
4040
cargo = "$(rustup which cargo)"
4141
full-bootstrap = true
4242
local-rebuild = true

scripts/test_rustc_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ rm src/test/ui/consts/issue-33537.rs # same
8989
# doesn't work due to the way the rustc test suite is invoked.
9090
# should work when using ./x.py test the way it is intended
9191
# ============================================================
92-
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in build/bin/
92+
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
9393
rm -r src/test/run-make/unstable-flag-required # same
9494
rm -r src/test/run-make/rustdoc-* # same
9595
rm -r src/test/run-make/issue-88756-default-output # same

0 commit comments

Comments
 (0)