mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-12 19:15:23 +01:00
Enable rust parallel front-end
See https://blog.rust-lang.org/2023/11/09/parallel-rustc.html
This commit is contained in:
parent
e77cbd0c15
commit
334554697d
2
build.py
2
build.py
@ -256,7 +256,7 @@ def run_cargo(cmds, triple="aarch64-linux-android"):
|
||||
env = os.environ.copy()
|
||||
env["PATH"] = f'{rust_bin}{os.pathsep}{env["PATH"]}'
|
||||
env["CARGO_BUILD_RUSTC"] = op.join(rust_bin, "rustc" + EXE_EXT)
|
||||
env["RUSTFLAGS"] = "-Clinker-plugin-lto"
|
||||
env["RUSTFLAGS"] = f"-Clinker-plugin-lto -Zthreads={min(8, cpu_count)}"
|
||||
env["TARGET_CC"] = op.join(llvm_bin, "clang" + EXE_EXT)
|
||||
env["TARGET_CFLAGS"] = f"--target={triple}23"
|
||||
return execv([cargo, *cmds], env)
|
||||
|
Loading…
Reference in New Issue
Block a user