Skip to content

[CI] Skip building binaryen from source on macOS#1704

Open
sbc100 wants to merge 1 commit intomainfrom
binaryen_macos
Open

[CI] Skip building binaryen from source on macOS#1704
sbc100 wants to merge 1 commit intomainfrom
binaryen_macos

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Apr 28, 2026

Our macOS CI instance is too old to build binaryen from source.

See WebAssembly/binaryen#8609

@sbc100 sbc100 requested review from juj and kripken April 28, 2026 18:20
@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Apr 28, 2026

@juj, what is the minimum version of Xcode that you need to support building binaryen using?

We just started using std::ranges in binaryen which seems to require Xcode 15.3. If that is too new then we would need to look into reverting I guess?

Our macOS CI instance is too old to build binaryen from source.

See WebAssembly/binaryen#8609
@juj
Copy link
Copy Markdown
Collaborator

juj commented Apr 28, 2026

Looking at our minimum target, the minimum macOS version for Unity developers for our next upcoming Unity release is macOS 13. Apple's Xcode support page says this would correspond to Xcode 15.2:

image

I wonder how feasible it would be to take this as minimum level of support?

There is the -DCMAKE_OSX_DEPLOYMENT_TARGET= directive in CMake, which supposedly should be able to be used to compile Binaryen on a newer system, while targeting an older system. But if possible, I would like to avoid needing to rely on that, and build on the same image where we do our tests at.

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Apr 28, 2026

Looking at our minimum target, the minimum macOS version for Unity developers for our next upcoming Unity release is macOS 13. Apple's Xcode support page says this would correspond to Xcode 15.2:

image I wonder how feasible it would be to take this as minimum level of support?

There is the -DCMAKE_OSX_DEPLOYMENT_TARGET= directive in CMake, which supposedly should be able to be used to compile Binaryen on a newer system, while targeting an older system. But if possible, I would like to avoid needing to rely on that, and build on the same image where we do our tests at.

Yes, I think CMAKE_OSX_DEPLOYMENT_TARGET is good solution here.

I would hope that there would be no need for the machine building your binaries to be running the oldest support macOS version for the target binaries. Do you actually do your binary building on macOS 13 today, or do you use CMAKE_OSX_DEPLOYMENT_TARGET on a more recent system?

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Apr 28, 2026

emsdk already builds all cmake projects with -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0, and we are not proposing to change that right now.

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Apr 28, 2026

Binaryen itself also already has set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")

@juj
Copy link
Copy Markdown
Collaborator

juj commented Apr 28, 2026

Do you actually do your binary building on macOS 13 today, or do you use CMAKE_OSX_DEPLOYMENT_TARGET on a more recent system?

We do reuse the current emsdk installs with the DCMAKE_OSX_DEPLOYMENT_TARGET= directives that are present there.

Currently we build Mac X64 from a macOS 10.14 system, and Mac ARM from a macOS 13 system. If I read the table correctly, this would mean that building Emscripten from source would require macOS 14 at minimum, for that Xcode 15.2.

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Apr 28, 2026

Do you actually do your binary building on macOS 13 today, or do you use CMAKE_OSX_DEPLOYMENT_TARGET on a more recent system?

We do reuse the current emsdk installs with the DCMAKE_OSX_DEPLOYMENT_TARGET= directives that are present there.

Currently we build Mac X64 from a macOS 10.14 system, and Mac ARM from a macOS 13 system. If I read the table correctly, this would mean that building Emscripten from source would require macOS 14 at minimum, for that Xcode 15.2.

Hmm, yes I think that unless we revert that means that binaryen would require macOS 14 to build from source.

Can you maybe confirm that binaryen main does or doesn't build on your systems @juj?

Assuming it doesn't then I think we probably need to revert the binaryen change, and add some CI testing on older macos.

Given that emsdk currently sets -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 how can tha work if you build for X64 on macOS 10.14 ? i.e. isn't it somehow wrong to set the deployment target to a version of macOS newer than the one you are running.

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Apr 29, 2026

It seems that binaryen would like to move forward with C++20 support, not just for ranges but also for co-routines.

I guess we should block the emsdk release in #1705, until this has been resolved?

@juj, are you able to perform the building of your SDK on at recent macOS machine (relying on the existing -DCMAKE_OSX_DEPLOYMENT_TARGET to ensure compatibility?)

@juj
Copy link
Copy Markdown
Collaborator

juj commented Apr 30, 2026

@juj, are you able to perform the building of your SDK on at recent macOS machine (relying on the existing -DCMAKE_OSX_DEPLOYMENT_TARGET to ensure compatibility?)

I'll try to give this a look asap next week.

@juj
Copy link
Copy Markdown
Collaborator

juj commented May 4, 2026

Commented in WebAssembly/binaryen#8657 (comment)

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