Skip to content

Commit 5ef1c8d

Browse files
authored
chore: cadical should never be built with fsanitize (#11423)
1 parent 30d88c8 commit 5ef1c8d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ jobs:
262262
// Always run on large if available, more reliable regarding timeouts
263263
"os": large ? "nscloud-ubuntu-22.04-amd64-8x16-with-cache" : "ubuntu-latest",
264264
"enabled": level >= 2,
265+
// do not fail nightlies on this for now
266+
"secondary": level <= 2,
265267
"test": true,
266268
// turn off custom allocator & symbolic functions to make LSAN do its magic
267269
"CMAKE_PRESET": "sanitize",

script/prepare-llvm-linux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ OPTIONS=()
5858
# We build cadical using the custom toolchain on Linux to avoid glibc versioning issues
5959
echo -n " -DLEAN_STANDALONE=ON -DCADICAL_USE_CUSTOM_CXX=ON"
6060
echo -n " -DCMAKE_CXX_COMPILER=$PWD/llvm-host/bin/clang++ -DLEAN_CXX_STDLIB='-Wl,-Bstatic -lc++ -lc++abi -Wl,-Bdynamic'"
61-
echo -n " -DLEAN_EXTRA_CXX_FLAGS='--sysroot $PWD/llvm -idirafter $GLIBC_DEV/include ${EXTRA_FLAGS:-}'"
61+
# these should also be used for cadical, so do not use `LEAN_EXTRA_CXX_FLAGS` here
62+
echo -n " -DCMAKE_CXX_FLAGS='--sysroot $PWD/llvm -idirafter $GLIBC_DEV/include ${EXTRA_FLAGS:-}'"
6263
# use target compiler directly when not cross-compiling
6364
if [[ -L llvm-host ]]; then
6465
echo -n " -DCMAKE_C_COMPILER=$PWD/stage1/bin/clang"

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if(LLD_PATH)
4242
endif()
4343

4444
set(LEAN_EXTRA_LINKER_FLAGS ${LEAN_EXTRA_LINKER_FLAGS_DEFAULT} CACHE STRING "Additional flags used by the linker")
45-
set(LEAN_EXTRA_CXX_FLAGS "" CACHE STRING "Additional flags used by the C++ compiler")
45+
set(LEAN_EXTRA_CXX_FLAGS "" CACHE STRING "Additional flags used by the C++ compiler. Unlike `CMAKE_CXX_FLAGS`, these will not be used to build e.g. cadical.")
4646
set(LEAN_TEST_VARS "LEAN_CC=${CMAKE_C_COMPILER}" CACHE STRING "Additional environment variables used when running tests")
4747

4848
if (NOT CMAKE_BUILD_TYPE)
@@ -191,7 +191,7 @@ endif()
191191
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
192192

193193
# Initialize CXXFLAGS.
194-
set(CMAKE_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -DLEAN_BUILD_TYPE=\"${CMAKE_BUILD_TYPE}\" -DLEAN_EXPORTING")
194+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEAN_EXTRA_CXX_FLAGS} -DLEAN_BUILD_TYPE=\"${CMAKE_BUILD_TYPE}\" -DLEAN_EXPORTING")
195195
set(CMAKE_CXX_FLAGS_DEBUG "-DLEAN_DEBUG")
196196
set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG")
197197
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG")

0 commit comments

Comments
 (0)