Skip to content

[rtsan][NFC] Rename RTSAN_LINK_LIBS to RTSAN_DYNAMIC_LIBS #109991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

cjappl
Copy link
Contributor

@cjappl cjappl commented Sep 25, 2024

Follow on to #109715

This better matches this same variable in asan, ubsan, hwasan, and nsan. Shows the logical coupling, and describes them as "dynamic only" which is their intent.

1:compiler-rt/lib/nsan/CMakeLists.txt:45:set(NSAN_DYNAMIC_LIBS
7:compiler-rt/lib/ubsan/CMakeLists.txt:66:set(UBSAN_DYNAMIC_LIBS
14:compiler-rt/lib/ubsan_minimal/CMakeLists.txt:16:set(UBSAN_DYNAMIC_LIBS ${SANITIZER_COMMON_LINK_LIBS})
16:compiler-rt/lib/asan/CMakeLists.txt:146:set(ASAN_DYNAMIC_LIBS
24:compiler-rt/lib/rtsan/CMakeLists.txt:28:set(RTSAN_DYNAMIC_LIBS
31:compiler-rt/lib/hwasan/CMakeLists.txt:96:set(HWASAN_DYNAMIC_LIBS

@cjappl
Copy link
Contributor Author

cjappl commented Sep 25, 2024

CC @davidtrevelyan

@llvmbot
Copy link
Member

llvmbot commented Sep 25, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Chris Apple (cjappl)

Changes

Follow on to #109715

This better matches this same variable in asan, ubsan, hwasan, and nsan. Shows the logical coupling, and describes them as "dynamic only" which is their intent.

1:compiler-rt/lib/nsan/CMakeLists.txt:45:set(NSAN_DYNAMIC_LIBS
7:compiler-rt/lib/ubsan/CMakeLists.txt:66:set(UBSAN_DYNAMIC_LIBS
14:compiler-rt/lib/ubsan_minimal/CMakeLists.txt:16:set(UBSAN_DYNAMIC_LIBS ${SANITIZER_COMMON_LINK_LIBS})
16:compiler-rt/lib/asan/CMakeLists.txt:146:set(ASAN_DYNAMIC_LIBS
24:compiler-rt/lib/rtsan/CMakeLists.txt:28:set(RTSAN_DYNAMIC_LIBS
31:compiler-rt/lib/hwasan/CMakeLists.txt:96:set(HWASAN_DYNAMIC_LIBS

Full diff: https://github.com/llvm/llvm-project/pull/109991.diff

1 Files Affected:

  • (modified) compiler-rt/lib/rtsan/CMakeLists.txt (+7-7)
diff --git a/compiler-rt/lib/rtsan/CMakeLists.txt b/compiler-rt/lib/rtsan/CMakeLists.txt
index d4296f56acd30d..b7e2362d31352c 100644
--- a/compiler-rt/lib/rtsan/CMakeLists.txt
+++ b/compiler-rt/lib/rtsan/CMakeLists.txt
@@ -25,7 +25,7 @@ set(RTSAN_CFLAGS
   ${COMPILER_RT_CXX_CFLAGS}
   -DSANITIZER_COMMON_NO_REDEFINE_BUILTINS)
 set(RTSAN_LINK_FLAGS ${COMPILER_RT_COMMON_LINK_FLAGS})
-set(RTSAN_LINK_LIBS
+set(RTSAN_DYNAMIC_LIBS
   ${COMPILER_RT_UNWINDER_LINK_LIBS}
   ${SANITIZER_CXX_ABI_LIBRARIES}
   ${SANITIZER_COMMON_LINK_LIBS})
@@ -61,11 +61,11 @@ set(RTSAN_COMMON_RUNTIME_OBJECT_LIBS
   RTSanitizerCommonCoverage
   RTSanitizerCommonSymbolizer)
 
-append_list_if(COMPILER_RT_HAS_LIBDL dl RTSAN_LINK_LIBS)
-append_list_if(COMPILER_RT_HAS_LIBRT rt RTSAN_LINK_LIBS)
-append_list_if(COMPILER_RT_HAS_LIBM m RTSAN_LINK_LIBS)
-append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread RTSAN_LINK_LIBS)
-append_list_if(COMPILER_RT_HAS_LIBLOG log RTSAN_LINK_LIBS)
+append_list_if(COMPILER_RT_HAS_LIBDL dl RTSAN_DYNAMIC_LIBS)
+append_list_if(COMPILER_RT_HAS_LIBRT rt RTSAN_DYNAMIC_LIBS)
+append_list_if(COMPILER_RT_HAS_LIBM m RTSAN_DYNAMIC_LIBS)
+append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread RTSAN_DYNAMIC_LIBS)
+append_list_if(COMPILER_RT_HAS_LIBLOG log RTSAN_DYNAMIC_LIBS)
 
 add_compiler_rt_component(rtsan)
 
@@ -80,7 +80,7 @@ if (APPLE)
     OBJECT_LIBS RTRtsan
                 ${RTSAN_COMMON_RUNTIME_OBJECT_LIBS}
     LINK_FLAGS ${RTSAN_LINK_FLAGS}
-    LINK_LIBS ${RTSAN_LINK_LIBS}
+    LINK_LIBS ${RTSAN_DYNAMIC_LIBS}
     PARENT_TARGET rtsan)
 else()
   add_compiler_rt_runtime(clang_rt.rtsan

@cjappl cjappl merged commit 6fae8b8 into llvm:main Sep 25, 2024
8 of 9 checks passed
@cjappl cjappl deleted the nfc_cmake_variable branch September 25, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants