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

Recent macos artifacts are no longer universal binaries #336

Closed
TerrorJack opened this issue Jul 20, 2023 · 5 comments
Closed

Recent macos artifacts are no longer universal binaries #336

TerrorJack opened this issue Jul 20, 2023 · 5 comments
Assignees

Comments

@TerrorJack
Copy link
Contributor

$ -bash-5.1$ file wasi-sdk-20.9g00cb3b2e5ffc/bin/clang-16
wasi-sdk-20.9g00cb3b2e5ffc/bin/clang-16: Mach-O 64-bit executable x86_64

Looks like to me 9a271da is the culprit. There may be a better way to make sure wasi-sdk builds for aarch64 linux while preserving arm64/x86_64 universal binaries for macos as well, I'll look into it a bit.

@sbc100
Copy link
Member

sbc100 commented Jul 24, 2023

It looks like 9a271da should be a no-op on Darwin. Why/how do you think it made any difference?

@TerrorJack
Copy link
Contributor Author

If you compare sizes of dist-macos-latest from https://github.com/WebAssembly/wasi-sdk/actions/runs/4953600854 to https://github.com/WebAssembly/wasi-sdk/actions/runs/5224553231, you'll see it almost halved since that commit, suggesting it is the culprit. For some reason, the artifacts and build logs aren't available for the time being, though I suspect it's a transient GitHub issue and we can look into the artifacts later.

I don't think it's an no-op. We pass make LLVM_CMAKE_FLAGS=... and for some reason the append logic in the makefile didn't happen, so it seems.

@sbc100
Copy link
Member

sbc100 commented Jul 25, 2023

I see, so its a bug in 9a271da and the LLVM_CMAKE_FLAGS += is not working as expected. Does one of you (@TerrorJack or @alexcrichton) have time if investigate? Most likely some kind of GNU Make edge case.

@alexcrichton
Copy link
Collaborator

Ah sorry I don't have time to investigate this. If it's causing issues feel free to revert the commit.

@abrown abrown self-assigned this Jul 25, 2023
abrown added a commit to abrown/wasi-sdk that referenced this issue Jul 27, 2023
In WebAssembly#321, some OSX-specific `Makefile` additions to `LLVM_CMAKE_FLAGS`
were skipped unless `make` is run on a Darwin OS. This allowed building
wasi-sdk for aarch64. But, as reported in WebAssembly#336, this also broke
arm64/x86_64 universal binaries that are built during CI.

The reason for this is that CI's `main.yml` overrides `LLVM_CMAKE_FLAGS`
to add caching but `make` will not append to a variable set on the
command line. This changes uses the `override` keyword to append to
such a variable, as suggested [here].

[here]: https://www.gnu.org/software/make/manual/html_node/Override-Directive.html
abrown added a commit that referenced this issue Jul 28, 2023
In #321, some OSX-specific `Makefile` additions to `LLVM_CMAKE_FLAGS`
were skipped unless `make` is run on a Darwin OS. This allowed building
wasi-sdk for aarch64. But, as reported in #336, this also broke
arm64/x86_64 universal binaries that are built during CI.

The reason for this is that CI's `main.yml` overrides `LLVM_CMAKE_FLAGS`
to add caching but `make` will not append to a variable set on the
command line. This changes uses the `override` keyword to append to
such a variable, as suggested [here].

[here]: https://www.gnu.org/software/make/manual/html_node/Override-Directive.html
@abrown
Copy link
Collaborator

abrown commented Jul 28, 2023

#337 closes this.

@abrown abrown closed this as completed Jul 28, 2023
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

No branches or pull requests

4 participants