0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-25 00:29:14 -05:00

Move clang download to target/debug/clang (#210)

To prevent rebuilds due to the compiler being in random directories.
This commit is contained in:
Ry Dahl 2020-01-16 14:20:57 -05:00 committed by GitHub
parent 03cab59c5c
commit 9d24f58765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,8 +180,17 @@ fn find_compatible_system_clang() -> Option<PathBuf> {
// modify the source directory. // modify the source directory.
fn clang_download() -> PathBuf { fn clang_download() -> PathBuf {
let root = env::current_dir().unwrap(); let root = env::current_dir().unwrap();
// target/debug//build/rusty_v8-d9e5a424d4f96994/out/
let out_dir = env::var_os("OUT_DIR").unwrap(); let out_dir = env::var_os("OUT_DIR").unwrap();
let clang_base_path = root.join(out_dir).join("clang"); let clang_base_path = root
.join(out_dir)
.parent()
.unwrap()
.parent()
.unwrap()
.parent()
.unwrap()
.join("clang");
println!("clang_base_path {}", clang_base_path.display()); println!("clang_base_path {}", clang_base_path.display());
let status = Command::new("python") let status = Command::new("python")
.arg("./tools/clang/scripts/update.py") .arg("./tools/clang/scripts/update.py")