From 2a991102977fd6f51d16612e10bd82d74b932e9a Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 5 Apr 2024 17:35:41 +0200 Subject: [PATCH] Update documentation to recommend using `y.sh rustc` instead of `rustc` and all its flags --- Readme.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index da6e91587fd..92916079959 100644 --- a/Readme.md +++ b/Readme.md @@ -118,7 +118,13 @@ error: failed to copy bitcode to object file: No such file or directory (os erro ### Rustc -> You should prefer using the Cargo method. +If you want to run `rustc` directly, you can do so with: + +```bash +$ ./y.sh rustc my_crate.rs +``` + +You can do the same manually (although we don't recommend it): ```bash $ LIBRARY_PATH="[gcc-path value]" LD_LIBRARY_PATH="[gcc-path value]" rustc +$(cat $CG_GCCJIT_DIR/rust-toolchain | grep 'channel' | cut -d '=' -f 2 | sed 's/"//g' | sed 's/ //g') -Cpanic=abort -Zcodegen-backend=$CG_GCCJIT_DIR/target/release/librustc_codegen_gcc.so --sysroot $CG_GCCJIT_DIR/build_sysroot/sysroot my_crate.rs