-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor cross compile assistance (#769)
* Refactor cross compilation assistance This implementation draft factors in the host/env architecture when generating assistance help text and/or cargo environment variables for the target triple. It drops support for the `x86_64-linux-musl-gcc` binary name on macOS (safe to assume users have migrated and/or provide assistance for currently supported toolchain). * No need to assign linker value to variable * Prefer pattern matching * Simplify expression * Move error handling logic * Combine functions * Provide better help text * Update help text to better fit output This should be moved to shared template. Instructions/required packages also needs to be tested further for each host OS (musl-tools and other packages may be required) * Decrease help text verbosity level * Use underscores in CC_* env vars * Fully qualify OS and ARCH name references Co-authored-by: Manuel Fuchs <[email protected]> * Avoid declaring new target variable Improve readability by redeclaring the target_triple variable, retaining the relavant terminology * Explicitly match supported mac archs * Add indoc dependency to libcnb-package * Reduce line length * Use indoc for multiline help text readability * Prefer formatdoc macro * Add whitespace * Add comment explaining musl-gcc env logic This will likely work without treating `musl-gcc` differently than other gcc_binaries, but requires further testing to ensure that's the case. The current implementation retains the logic prior to this pull request * Don't use raw string literal No characters are used that would otherwise need escape * Remove newline The help_text already includes a newline by the end * Fix gcc-x86-64 compiler package name * Add required packages to help text I previously removed libc6-dev-arm64-cross as it is installed by default (as a recommended package for the transient dependency) https://packages.ubuntu.com/jammy/gcc-11-aarch64-linux-gnu Adding it back to the help text as it is not a hard dependency (and won't be installed if the `--no-install-recommends` flag is set) * Add required amd64 packages * Update changelog `libcnb-package` changes * Adjust help text wrapping Co-authored-by: Ed Morley <[email protected]> * Rename gcc_path to gcc_binary_name * Move changelog entries to top level --------- Co-authored-by: Manuel Fuchs <[email protected]> Co-authored-by: Ed Morley <[email protected]>
- Loading branch information
1 parent
2907c18
commit 9d23107
Showing
3 changed files
with
80 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters