-
Notifications
You must be signed in to change notification settings - Fork 13.5k
workflows/release-binaries: Use static ZSTD on macOS #109909
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
workflows/release-binaries: Use static ZSTD on macOS #109909
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-github-workflow Author: Keith Smiley (keith) ChangesOn macOS the shared zstd library points to a homebrew install that isn't Full diff: https://github.com/llvm/llvm-project/pull/109909.diff 1 Files Affected:
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 925912df6843e4..f284f04ece5b3d 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -126,7 +126,7 @@ jobs:
# add extra CMake args to disable them.
# See https://github.com/llvm/llvm-project/issues/99767
if [ "${{ runner.os }}" = "macOS" ]; then
- target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
+ target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF -DLLVM_USE_STATIC_ZSTD=ON"
if [ "${{ runner.arch }}" = "ARM64" ]; then
arches=arm64
else
|
I'm hoping we can verify from the CI jobs that run here that this fix is working e2e |
I wonder if we want enable static zlib while on it? otherwise LGTM. |
I think zlib is part of macOS, but I'd have to double check |
confirmed, so idk if that one is worth it or not. blah looks like testing is blocked on a real issue. i'll try to rebase and get lucky |
dd5b383
to
26c8a32
Compare
Go ahead and merge and make a cherry pick for the release branch and I can get it in before the next release. |
I was just hoping to get some binaries here first to do a final checkup |
@@ -126,7 +126,7 @@ jobs: | |||
# add extra CMake args to disable them. | |||
# See https://github.com/llvm/llvm-project/issues/99767 | |||
if [ "${{ runner.os }}" = "macOS" ]; then | |||
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF" | |||
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF -DLLVM_USE_STATIC_ZSTD=ON" |
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.
You need to add a BOOTSTRAP_ prefix to this so that it is applied to the stage2 build. It may also make more sense to move this into the Release.cmake file.
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.
thanks, trying it in Release.cmake, still scoped to only macOS (although I think there's a reasonable argument to do this on Linux as well)
4d4f8a2
to
338527b
Compare
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 looks good to me. It looks like we need to add the Release.cmake file to the list of files that trigger the release-binaries-all test, but that can be done in another PR.
I pushed a dummy change to that just to verify so we don't have to go back and forth on it again. I put up the PR for the path changes here #110394, I was surprised to see this file is in the clang/ specific subdir, but also didn't see any other Release.cmake files to add here |
On macOS the shared zstd library points to a homebrew install that isn't very stable for users.
00cce08
to
c4f0368
Compare
ah thanks, looks like this didn't work then |
If you add these 3 options to the cmake invocation in release-binaries.yml, it should give us more verbose output and make the problem easier to debug:
|
It looks like at least 1 issue was that CMAKE_SYSTEM_NAME isn't set at the time this configuration is loaded, I swapped it to use the host system name, which is imperfect, but probably fine. Lets see if that works |
if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin") | ||
set_final_stage_var(LLVM_USE_STATIC_ZSTD "ON" BOOL) | ||
endif() |
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.
If this doesn't work, I think it would be OK to set this unconditionally too.
the latest commit seems to have fixed it! |
should I cherry pick this for future releases? |
@keith Yes, this change needs to be in the release branch or it won't take effect. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/6757 Here is the relevant piece of the build log for the reference
|
On macOS the shared zstd library points to a homebrew install that isn't very stable for users.
On macOS the shared zstd library points to a homebrew install that isn't
very stable for users.