0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-25 15:29:43 -05:00
denoland-rusty-v8/rust-toolchain.toml
Chiichen 4dd87b2dc1
chore: Fixed incorrect use of cfg! macro and update build.rs to support arm target (#1458)
What I've done

    Fixed incorrect use of cfg! macro use the CARGO_CFG_TARGET_<OS/ARCH> macro instead of the original cfg! (target_<os/arch>) This is because The build script is compiled for the host architecture as a separate build phase, as that's where it runs. Since the cfg macro runs at compile time it'll always report the host configuration there.When cargo runs the build script it passes the configuration through environment variables, one of which is CARGO_CFG_TARGET_ARCH. Some dicussions can be found here

    update build.rs to support arm target support arm target. Like the Aarch64 target, we need to additionally install the cross-compilation toolchain and specify the linker in Cargo/config.toml. I can add this part of the work in next pull request if necessary.


Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-05-12 11:00:14 -06:00

12 lines
287 B
TOML

[toolchain]
channel = "1.77.2"
components = ["rustfmt", "clippy"]
targets = [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
"aarch64-linux-android",
"x86_64-linux-android",
]