[compiler-rt] [rtsan][NFC] Rename RTSAN_LINK_LIBS to RTSAN_DYNAMIC_LIBS (PR #109991)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 07:31:28 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

Author: Chris Apple (cjappl)

<details>
<summary>Changes</summary>

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
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

``````````

</details>


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


More information about the llvm-commits mailing list