Skip to content

Commit 938b3e6

Browse files
committed
Fix zstd build when static zstd libraries are not avilable
1 parent 4136b12 commit 938b3e6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

buildbot/configure.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def do_configure(args):
6464

6565
sycl_enable_xpti_tracing = "ON"
6666
xpti_enable_werror = "OFF"
67-
llvm_enable_zstd = "OFF"
67+
llvm_enable_zstd = "ON"
6868

6969
if sys.platform != "darwin":
7070
sycl_enabled_backends.append("level_zero")
@@ -134,8 +134,6 @@ def do_configure(args):
134134

135135
# For clang-format, clang-tidy and code coverage
136136
llvm_enable_projects += ";clang-tools-extra;compiler-rt"
137-
# Build with zstd enabled on CI.
138-
llvm_enable_zstd = "ON"
139137
if sys.platform != "darwin":
140138
# libclc is required for CI validation
141139
libclc_enabled = True

llvm/cmake/config-ix.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,14 @@ if(LLVM_ENABLE_ZSTD)
157157
find_package(zstd QUIET)
158158
endif()
159159
endif()
160+
161+
# If LLVM_USE_STATIC_ZSTD is specified, make sure we enable zstd only if static
162+
# libraries are found.
163+
if(LLVM_USE_STATIC_ZSTD AND NOT TARGET zstd::libzstd_static)
164+
set(LLVM_ENABLE_ZSTD OFF)
165+
else()
160166
set(LLVM_ENABLE_ZSTD ${zstd_FOUND})
167+
endif()
161168

162169
if(LLVM_ENABLE_LIBXML2)
163170
if(LLVM_ENABLE_LIBXML2 STREQUAL FORCE_ON)

0 commit comments

Comments
 (0)