Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake-rs does not work with custom CC_{TARGET} environment variables that uses arguments. #201

Open
richarddd opened this issue Jan 16, 2024 · 0 comments

Comments

@richarddd
Copy link

richarddd commented Jan 16, 2024

Arguments are not applied when setting a custom CC or CXX variable:

[env]
CC_aarch64_unknown_linux_musl = "zig cc -target aarch64-linux-musl"
CXX_aarch64_unknown_linux_musl = "zig cc -target aarch64-linux-musl"
CC_x86_64_unknown_linux_musl = "zig cc -target x86_64-linux-musl"
CXX_x86_64_unknown_linux_musl = "zig cc -target x86_64-linux-musl"

In https://github.com/rust-lang/cmake-rs/blob/c4a60dd154dd90e469dffc41a1faa717704f90b3/src/lib.rs#L745C36-L745C52 we only apply args and not wrapper_args.

Maybe instead use https://docs.rs/cc/latest/cc/struct.Tool.html#method.to_command and then get all the args from there because that includes wrapper args.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant