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

Fix cross-compiling zig on alpine #15400

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Fix cross-compiling zig on alpine #15400

merged 3 commits into from
Nov 25, 2024

Conversation

Electroid
Copy link
Contributor

What does this PR do?

The ordering of options in CMake is important. Before project() is called, variables such as LINUX and WIN32 correspond to the host platform, but after project() is called, it corresponds to the target platform.

  • Globals.cmake is evaluated before project()
  • Options.cmake is evaluated after project()

Previously, ABI was calculated in Globals, but this would mean that if you tried to cross-compile Zig on an Alpine host, it would think that the target should also have the musl ABI.

@robobun
Copy link

robobun commented Nov 25, 2024

@Electroid, your commit 290588d has some failures in #6807

@Electroid Electroid merged commit f61f03f into main Nov 25, 2024
13 of 31 checks passed
@Electroid Electroid deleted the ci-fix-x-compile-zig branch November 25, 2024 07:07
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