[compiler-rt] 6884c1f - [test][GWP-ASan] Only add check-gwp_asan when its dependencies are built (#89164)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 14:57:00 PDT 2024


Author: Wu Yingcong
Date: 2024-04-22T14:56:56-07:00
New Revision: 6884c1fc449890455751901b84e4eb6a3b558aea

URL: https://github.com/llvm/llvm-project/commit/6884c1fc449890455751901b84e4eb6a3b558aea
DIFF: https://github.com/llvm/llvm-project/commit/6884c1fc449890455751901b84e4eb6a3b558aea.diff

LOG: [test][GWP-ASan] Only add check-gwp_asan when its dependencies are built (#89164)

Currently, `check-gwp_asan` is added no matter its dependencies are
built or not, this is wrong and will cause cmake error when scudo is not
built. This patch includes the target in the dependencies check.

Added: 
    

Modified: 
    compiler-rt/test/gwp_asan/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/gwp_asan/CMakeLists.txt b/compiler-rt/test/gwp_asan/CMakeLists.txt
index 86260027426feb..eda23cd93d6c37 100644
--- a/compiler-rt/test/gwp_asan/CMakeLists.txt
+++ b/compiler-rt/test/gwp_asan/CMakeLists.txt
@@ -35,9 +35,9 @@ if (COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_HAS_SCUDO_STANDALONE AND COMPILER_
       ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py)
     list(APPEND GWP_ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
   endforeach()
-endif()
 
-add_lit_testsuite(check-gwp_asan "Running the GWP-ASan tests"
-  ${GWP_ASAN_TESTSUITES}
-  DEPENDS ${GWP_ASAN_TEST_DEPS})
-set_target_properties(check-gwp_asan PROPERTIES FOLDER "Compiler-RT Misc")
+  add_lit_testsuite(check-gwp_asan "Running the GWP-ASan tests"
+    ${GWP_ASAN_TESTSUITES}
+    DEPENDS ${GWP_ASAN_TEST_DEPS})
+  set_target_properties(check-gwp_asan PROPERTIES FOLDER "Compiler-RT Misc")
+endif()


        


More information about the llvm-commits mailing list