Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cross-compilation assistance: Set the CXX_* and AR_* environment variables too #725

@edmorley

Description

@edmorley

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions