From d9fb15989a911c85b409685954172cb94b2667f9 Mon Sep 17 00:00:00 2001 From: Ruoxi Sun Date: Thu, 28 Mar 2024 18:06:42 +0800 Subject: [PATCH 1/2] Fix TSAN link error for module library --- cpp/cmake_modules/san-config.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/cmake_modules/san-config.cmake b/cpp/cmake_modules/san-config.cmake index 2221dc16665..f4ba4c83c6d 100644 --- a/cpp/cmake_modules/san-config.cmake +++ b/cpp/cmake_modules/san-config.cmake @@ -78,6 +78,7 @@ if(${ARROW_USE_TSAN}) # Some of the above also need to be passed to the linker. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie -fsanitize=thread") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie -fsanitize=thread") # Strictly speaking, TSAN doesn't require dynamic linking. But it does # require all code to be position independent, and the easiest way to From a8c7efa896046e282e959a6b8a982b6521fa843c Mon Sep 17 00:00:00 2001 From: Ruoxi Sun Date: Thu, 28 Mar 2024 18:17:37 +0800 Subject: [PATCH 2/2] Fix --- cpp/cmake_modules/san-config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake_modules/san-config.cmake b/cpp/cmake_modules/san-config.cmake index f4ba4c83c6d..8c2983e18b4 100644 --- a/cpp/cmake_modules/san-config.cmake +++ b/cpp/cmake_modules/san-config.cmake @@ -78,7 +78,7 @@ if(${ARROW_USE_TSAN}) # Some of the above also need to be passed to the linker. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie -fsanitize=thread") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie -fsanitize=thread") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pie -fsanitize=thread") # Strictly speaking, TSAN doesn't require dynamic linking. But it does # require all code to be position independent, and the easiest way to