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

Replace lipo command line with fat-macho crate #405

Merged
merged 3 commits into from
Feb 13, 2021

Conversation

messense
Copy link
Member

@messense messense commented Jan 20, 2021

lipo is only available on macOS as a command line tool, the fat-macho crate implemented a cross platform Mach-O fat binary writer, makes it easier to do cross compilation.

Based on #404

@messense messense force-pushed the fat-macho branch 10 times, most recently from de41b12 to bb640c6 Compare January 27, 2021 06:15
@messense messense marked this pull request as ready for review January 27, 2021 06:25
@messense messense requested a review from konstin January 27, 2021 06:26
bindir="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/bin"
echo "CC=${bindir}/clang" >> "${GITHUB_ENV}"
echo "CXX=${bindir}/clang++" >> "${GITHUB_ENV}"
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "${GITHUB_ENV}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xcode 12.2 and later can compile to both x86_64 and arm64 targets on Intel & Apple Silicon platforms. I am not sure why xcode-select alone does not work, had to setup CC, CXX etc.

src/build_context.rs Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall!

.github/workflows/test.yml Show resolved Hide resolved
src/build_context.rs Show resolved Hide resolved
src/build_options.rs Outdated Show resolved Hide resolved
src/compile.rs Outdated Show resolved Hide resolved
tests/common/integration.rs Outdated Show resolved Hide resolved
@messense messense force-pushed the fat-macho branch 2 times, most recently from 6365df1 to a53fb1f Compare February 13, 2021 13:41
@konstin
Copy link
Member

konstin commented Feb 13, 2021

Thanks again!

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

Successfully merging this pull request may close these issues.

2 participants