[compiler-rt] 5717236 - [CMake] Fix the condition to include asan_rtl_x86_64.S in libclang_rt.asan_static.a

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 12:05:25 PST 2023


Author: Fangrui Song
Date: 2023-11-22T12:05:19-08:00
New Revision: 5717236f7e1fde7948569466fa7dfd7c6562f160

URL: https://github.com/llvm/llvm-project/commit/5717236f7e1fde7948569466fa7dfd7c6562f160
DIFF: https://github.com/llvm/llvm-project/commit/5717236f7e1fde7948569466fa7dfd7c6562f160.diff

LOG: [CMake] Fix the condition to include asan_rtl_x86_64.S in libclang_rt.asan_static.a

In a build supporting both i386/x86_64, the condition added by
https://reviews.llvm.org/D149957 caused asan_rtl_x86_64.S not to be
built. Fix it.

Added: 
    

Modified: 
    compiler-rt/lib/asan/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt
index 48d0e91052d73bb..f993521d3ca88be 100644
--- a/compiler-rt/lib/asan/CMakeLists.txt
+++ b/compiler-rt/lib/asan/CMakeLists.txt
@@ -46,7 +46,7 @@ set(ASAN_STATIC_SOURCES
   asan_rtl_static.cpp
   )
 
-if (ASAN_SUPPORTED_ARCH STREQUAL "x86_64" AND NOT WIN32 AND NOT APPLE)
+if ("x86_64" IN_LIST ASAN_SUPPORTED_ARCH AND NOT WIN32 AND NOT APPLE)
   list(APPEND ASAN_STATIC_SOURCES
     asan_rtl_x86_64.S
   )


        


More information about the llvm-commits mailing list