Open
Description
The cross compile toolchain docs at https://github.com/messense/homebrew-macos-cross-toolchains suggest setting all three of these env vars (adjusted appropriately for the name of the target):
CC_x86_64_unknown_linux_gnu=x86_64-linux-gnu-gcc
CXX_x86_64_unknown_linux_gnu=x86_64-linux-gnu-g++
AR_x86_64_unknown_linux_gnu=x86_64-linux-gnu-ar
However, currently we're only setting the CC_*
variant, not the CXX_*
and AR_*
env vars.
Whilst this works for all of the Rust crates we happen to use so far, for completeness we should probably set them all, in case someone uses a crate that relies on a tool that needs them to be set.
See:
https://github.com/heroku/libcnb.rs/blob/main/libcnb-package/src/cross_compile.rs