Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Electroid committed Nov 25, 2024
1 parent a468d09 commit d07471e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
10 changes: 0 additions & 10 deletions cmake/Globals.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,6 @@ else()
set(WARNING WARNING)
endif()

if(LINUX)
if(EXISTS "/etc/alpine-release")
set(DEFAULT_ABI "musl")
else()
set(DEFAULT_ABI "gnu")
endif()

optionx(ABI "musl|gnu" "The ABI to use (e.g. musl, gnu)" DEFAULT ${DEFAULT_ABI})
endif()

# TODO: This causes flaky zig builds in CI, so temporarily disable it.
# if(CI)
# set(DEFAULT_VENDOR_PATH ${CACHE_PATH}/vendor)
Expand Down
10 changes: 10 additions & 0 deletions cmake/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ else()
message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

if(LINUX)
if(EXISTS "/etc/alpine-release")
set(DEFAULT_ABI "musl")
else()
set(DEFAULT_ABI "gnu")
endif()

optionx(ABI "musl|gnu" "The ABI to use (e.g. musl, gnu)" DEFAULT ${DEFAULT_ABI})
endif()

if(ARCH STREQUAL "x64")
optionx(ENABLE_BASELINE BOOL "If baseline features should be used for older CPUs (e.g. disables AVX, AVX2)" DEFAULT OFF)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/targets/BuildBun.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ if(NOT BUN_CPP_ONLY)

if(CI)
set(bunTriplet bun-${OS}-${ARCH})
if(ABI STREQUAL "musl")
if(LINUX AND ABI STREQUAL "musl")
set(bunTriplet ${bunTriplet}-musl)
endif()
if(ENABLE_BASELINE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/tools/SetupLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(NOT ENABLE_LLVM)
return()
endif()

if(CMAKE_HOST_WIN32 OR CMAKE_HOST_APPLE OR ABI STREQUAL "musl")
if(CMAKE_HOST_WIN32 OR CMAKE_HOST_APPLE OR EXISTS "/etc/alpine-release")
set(DEFAULT_LLVM_VERSION "18.1.8")
else()
set(DEFAULT_LLVM_VERSION "16.0.6")
Expand Down
2 changes: 1 addition & 1 deletion cmake/tools/SetupWebKit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ else()
message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

if(ABI STREQUAL "musl")
if(LINUX AND ABI STREQUAL "musl")
set(WEBKIT_SUFFIX "-musl")
endif()

Expand Down

0 comments on commit d07471e

Please sign in to comment.