Skip to content

Commit a0c503c

Browse files
authored
fix: cadical dynamic dependencies (#11475)
#11423 led to cadical being built with the wrong sysroot flags, which resulted in it linking against the more recent system glibc
1 parent 0e83422 commit a0c503c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
4444
set(CADICAL_CXX c++)
4545
if (CADICAL_USE_CUSTOM_CXX)
4646
set(CADICAL_CXX ${CMAKE_CXX_COMPILER})
47-
set(CADICAL_CXXFLAGS "${LEAN_EXTRA_CXX_FLAGS}")
47+
# Use same platform flags as for Lean executables, in particular from `prepare-llvm-linux.sh`,
48+
# but not Lean-specific `LEAN_EXTRA_CXX_FLAGS` such as fsanitize.
49+
set(CADICAL_CXXFLAGS "${CMAKE_CXX_FLAGS}")
4850
set(CADICAL_LDFLAGS "-Wl,-rpath=\\$$ORIGIN/../lib")
4951
endif()
5052
find_program(CCACHE ccache)

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ if(LLVM AND ${STAGE} GREATER 0)
448448
# - In particular, `host/bin/llvm-config` produces flags like `-Lllvm-host/lib/libLLVM`, while
449449
# we need the path to be `-Lllvm/lib/libLLVM`. Thus, we perform this replacement here.
450450
string(REPLACE "llvm-host" "llvm" LEANSHARED_LINKER_FLAGS ${LEANSHARED_LINKER_FLAGS})
451-
string(REPLACE "llvm-host" "llvm" LEAN_EXTRA_CXX_FLAGS ${LEAN_EXTRA_CXX_FLAGS})
452-
message(VERBOSE "leanshared linker flags: '${LEANSHARED_LINKER_FLAGS}' | lean extra cxx flags '${LEAN_EXTR_CXX_FLAGS}'")
451+
string(REPLACE "llvm-host" "llvm" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
452+
message(VERBOSE "leanshared linker flags: '${LEANSHARED_LINKER_FLAGS}' | lean extra cxx flags '${CMAKE_CXX_FLAGS}'")
453453
endif()
454454

455455
# get rid of unused parts of C++ stdlib

0 commit comments

Comments
 (0)