Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions conan/profiles/tsan
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ tools.build:cxxflags=["-fsanitize=thread", "-fno-omit-frame-pointer"]
tools.build:cflags=["-fsanitize=thread", "-fno-omit-frame-pointer"]
tools.build:sharedlinkflags=["-fsanitize=thread"]
tools.build:exelinkflags=["-fsanitize=thread"]
# Give this profile a unique build-folder discriminator so Conan generates a
# preset named "conan-debug-tsan" instead of "conan-debug", preventing a
# duplicate-preset collision with the plain debug profile in
# CMakeUserPresets.json (see issue #324).
user.keystone.sanitizer=tsan
tools.cmake.cmake_layout:build_folder_vars=["settings.build_type", "user.keystone.sanitizer"]
11 changes: 6 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ build:
test:
make test NATIVE=1

# Install Conan dependencies (tsan profile)
# Removes the Conan-generated CMakePresets.json from the tsan output folder to prevent
# a duplicate "conan-debug" preset collision with the debug build in CMakeUserPresets.json.
# Install Conan dependencies (tsan profile).
# The tsan Conan profile sets user.keystone.sanitizer=tsan and
# tools.cmake.cmake_layout:build_folder_vars so Conan names its generated
# preset "conan-debug-tsan" rather than "conan-debug", preventing a
# duplicate-preset collision with the plain debug build in CMakeUserPresets.json
# regardless of whether conan install is invoked via just or directly.
deps-tsan:
conan install . \
--output-folder=build/tsan \
--profile=conan/profiles/tsan \
--build=missing
rm -f build/tsan/CMakePresets.json
python3 scripts/remove-preset-include.py CMakeUserPresets.json build/tsan/CMakePresets.json

# Build with ThreadSanitizer
build-tsan: deps-tsan
Expand Down
Loading