Skip to content

Commit 2f827de

Browse files
committed
Test fix for sporadic Mac build failure
Signed-off-by: Adam Glustein <[email protected]>
1 parent 8416044 commit 2f827de

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ test-py-sanitizer: ## Clean and Make unit tests with sanitizers enabled
9191
@if [ "$$(uname -s)" = "Darwin" ]; then \
9292
ASAN_OPTIONS=detect_leaks=0,detect_stack_use_after_return=true,use_odr_indicator=1,strict_init_order=true,strict_string_checks=true \
9393
DYLD_INSERT_LIBRARIES=$$($(CXX) -print-file-name=libclang_rt.asan_osx_dynamic.dylib) \
94+
DYLD_FORCE_FLAT_NAMESPACE=1 \
9495
python -m pytest -v csp/tests --junitxml=junit.xml $(TEST_ARGS); \
9596
elif [ "$$(uname -s)" = "Linux" ]; then \
9697
ASAN_OPTIONS=detect_leaks=0,detect_stack_use_after_return=true,use_odr_indicator=1,strict_init_order=true,strict_string_checks=true \

cpp/cmake/modules/Findcsp_autogen.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function(csp_autogen MODULE_NAME DEST_FILENAME HEADER_NAME_OUTVAR SOURCE_NAME_OU
3434
OUTPUT_VARIABLE ASAN_LIB_PATH
3535
OUTPUT_STRIP_TRAILING_WHITESPACE
3636
)
37-
set(PRELOAD_CMD "DYLD_INSERT_LIBRARIES=${ASAN_LIB_PATH}")
37+
set(PRELOAD_CMD "DYLD_INSERT_LIBRARIES=${ASAN_LIB_PATH} DYLD_FORCE_FLAT_NAMESPACE=1")
3838
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
3939
# GCC - use LD_PRELOAD
4040
execute_process(

0 commit comments

Comments
 (0)