-
Notifications
You must be signed in to change notification settings - Fork 68
Fixes macOS arm 19 and 20 #82
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
Conversation
Squashed commit of the following: commit 91f1840 Author: Colin Sullivan <[email protected]> Date: Thu Jul 3 11:20:55 2025 -0700 uncomment commit d21315b Author: Colin Sullivan <[email protected]> Date: Wed Jul 2 13:55:22 2025 -0700 19 w macosx commit f61824d Author: Colin Sullivan <[email protected]> Date: Wed Jul 2 13:53:57 2025 -0700 try 19 too commit cda94cd Author: Colin Sullivan <[email protected]> Date: Wed Jul 2 12:36:28 2025 -0700 std static linking as a CXX flag commit 1603f38 Author: Colin Sullivan <[email protected]> Date: Wed Jul 2 10:33:14 2025 -0700 Try zstd static linking flag added to all macos builds commit 8e6d2bf Author: Colin Sullivan <[email protected]> Date: Wed Jul 2 10:32:31 2025 -0700 Moves macOS target to shared MACOS_CMAKE_ARGS variable commit 1ccf586 Merge: 5ed997e 8b0dab3 Author: Colin Sullivan <[email protected]> Date: Wed Jul 2 10:23:18 2025 -0700 Merge remote-tracking branch 'upstream/master' into macos-arm-20 commit 5ed997e Author: Colin Sullivan <[email protected]> Date: Wed Jun 25 16:14:10 2025 -0700 comment other versions for testing commit 233f508 Author: Colin Sullivan <[email protected]> Date: Wed Jun 25 16:13:31 2025 -0700 unexclude macos-arm 20
3dc610f
to
f1ce96d
Compare
but I guess it isn't actually statically linking |
@@ -74,7 +74,7 @@ jobs: | |||
# Uses a macOS arm image here | |||
# https://github.com/actions/runner-images | |||
runner: macos-14 | |||
os-cmake-args: '-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -flto" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 ${POSIX_CMAKE_ARGS} ${MACOS_CMAKE_ARGS} -DLLVM_TARGETS_TO_BUILD=AArch64' | |||
os-cmake-args: '-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -flto -DZSTD_STATIC_LINKING_ONLY" ${POSIX_CMAKE_ARGS} ${MACOS_CMAKE_ARGS} -DLLVM_TARGETS_TO_BUILD=AArch64' |
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.
the error you are showing is about libz.dylib
-- I don't see this flag documented anywhere other than in facebook/folly where it refers to the zstd compression library they use.
Assuming the intent is to link libz aka zlib statically you will probably have to supply both compiler and linker directives to accomplish this.
However I think you should investigate the root cause of why it cannot locate the libz.dylib which is meant to be supplied by macOS. My theory posted on the other thread is that there is a CPU architecture mismatch of some kind
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.
Yes that helps , thank you...
Maybe my method of requesting arm hosts from GitHub is flawed ? I will look into that...
Yay we've got macOS arm builds finally |
Good job! |
If you look at the logs of the macOS 14 arm with llvm 19, what does the warnings at the end of the build step mean? (Object files built for newer->14 than linked ->10.15) Is it problematic? |
hmm I'll check this out - usually this is related to versioning of macOS and their supported APIs - I would think for our purposes it does not matter but could lead to compatibility issues on old macOS systems |
✅ Tested clang-format-14 on macOS 10.15.7 and macOS 13.6.3 |
✅ Tested clang-format-19 on macOS 13.6.3 (arm) |
❌ Tested clang-format-19 on macOS 11.7.2 (amd64) - here I got the libzstd.1.dylib error too |
❌ Tested clang-format-19 on macOS 13.2.1 (amd64) - here I got the libzstd.1.dylib error too Seems this is architecture related, not OS compatibility related, and the "integration" test in the repo does not succeed in catching it... |
having a consistent I believe this warning could lead to crashes if you use new APIs on an older OS -- the macOS SDK will shim or replace OS calls that do not exist on older OS's when building, but does nothing if your API level and deployment target match. How much this matters for the llvm codebase, I have no idea |
Disable zstd and zlib for macos
disabling zlib and zstd merged, this one should pass and I will merge it |
Enables macOS arm 19 & 20
DRY
DCMAKE_OSX_DEPLOYMENT_TARGET
flagCloses #76
Closes #77