-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: Add macOS to build matrix #102
Conversation
indeed the renaming from iOS to apple is needed now. |
e3fb802
to
5c96404
Compare
Marking this as ready for review with a few caveats. I can't build dawn locally, most likely because I am using the Xcode 16 beta. I'll try with Xcode 15 later. Because of this, I'm not entirely sure the PR is accurate but comparing with #88 I think it looks mostly correct? And if this works on your machine (and Ci) then we also get prebuilt binaries from the CI artifacts 😀 |
}); | ||
|
||
libs.forEach((lib) => { | ||
console.log(`Building fat binary for macOS: ${lib}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed right?
"xcodebuild -create-xcframework " + | ||
`-library ${projectRoot}/libs/apple/${lib}_macos.a ` + | ||
`-library ${projectRoot}/libs/apple/arm64_macosx/${lib}.a ` + | ||
` -output ${projectRoot}/libs/apple/${lib}_macos.xcframework `, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this probably should be (no fatlib for macos because there is no macos simulator):
// macOS
$(
"xcodebuild -create-xcframework " +
`-library ${projectRoot}/libs/apple/x86_64_macosx/${lib}.a ` +
`-library ${projectRoot}/libs/apple/arm64_macosx/${lib}.a ` +
` -output ${projectRoot}/libs/apple/${lib}_macos.xcframework `,
);
@@ -8,7 +8,7 @@ index 046a6af10d..5a63ac3d6d 100644 | |||
|
|||
- add_library(${output_target} SHARED ${all_objects}) | |||
- | |||
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "iOS" OR ${CMAKE_SYSTEM_NAME} STREQUAL "visionOS") | |||
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "iOS" OR ${CMAKE_SYSTEM_NAME} STREQUAL "visionOS" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌🏼
looking good. Due to the way podspecs work at the moment, I suggest that we build |
Add macOS to the build matrix for dawn, and add the libraries to the
xcframework
. I can't get dawn building locally (most likely to my using Xcode 16 Beta). However, if this PR lands (and CI passes), then we'll have prebuilt macOS binaries available :).