Skip to content

Commit 9c54981

Browse files
committed
debugging and TSan build info
1 parent 652c35f commit 9c54981

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

quaddtype/reinstall.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ if [ -d "build/" ]; then
88
rm -rf subprojects/sleef
99
fi
1010

11-
# export CFLAGS="-g -O0"
12-
# export CXXFLAGS="-g -O0"
1311
python -m pip uninstall -y numpy_quaddtype
1412
python -m pip install . -vv --no-build-isolation 2>&1 | tee build_log.txt
13+
14+
# for debugging and TSAN builds, comment the above line and uncomment all below:
15+
# export CFLAGS="-fsanitize=thread -g -O0"
16+
# export CXXFLAGS="-fsanitize=thread -g -O0"
17+
# export LDFLAGS="-fsanitize=thread"
18+
# python -m pip install . -vv --no-build-isolation -Csetup-args=-Db_sanitize=thread 2>&1 | tee build_log.txt

quaddtype/subprojects/packagefiles/sleef/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if host_machine.system() == 'windows'
1212
parallel_flag = []
1313
endif
1414

15+
# uncomment below lines for TSAN builds (in case compiler flags are not picked up from meson)
1516
sleef_configure = run_command([
1617
cmake,
1718
'-S', meson.current_source_dir(),
@@ -22,6 +23,10 @@ sleef_configure = run_command([
2223
'-DSLEEF_BUILD_TESTS=OFF',
2324
'-DSLEEF_BUILD_INLINE_HEADERS=OFF',
2425
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
26+
# '-DCMAKE_C_FLAGS=-fsanitize=thread -g',
27+
# '-DCMAKE_CXX_FLAGS=-fsanitize=thread -g',
28+
# '-DCMAKE_EXE_LINKER_FLAGS=-fsanitize=thread',
29+
# '-DCMAKE_SHARED_LINKER_FLAGS=-fsanitize=thread',
2530
'-DCMAKE_INSTALL_PREFIX=' + meson.current_build_dir() / sleef_install_dir
2631
], check: false, capture: true)
2732

quaddtype/tests/test_multithreading.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
if IS_WASM:
1313
pytest.skip(allow_module_level=True, reason="no threading support in wasm")
1414

15-
pytestmark = pytest.mark.thread_unsafe(
16-
reason="tests in this module are already explicitly multi-threaded"
17-
)
18-
1915
from numpy_quaddtype import *
2016

2117

0 commit comments

Comments
 (0)