[scudo][standalone] Fix tests makefile
authorKostya Kortchinsky <kostyak@google.com>
Fri, 1 Mar 2019 15:46:23 +0000 (15:46 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Fri, 1 Mar 2019 15:46:23 +0000 (15:46 +0000)
Summary:
A missing `STATIC` entailed some annoying to debug failures wrt 32 vs 64
binaries. Additionally I noticed I was using the wrong variable (the Scudo
one as opposed to the Scudo Standalone one).

See https://reviews.llvm.org/D58184#1412417 and below for discussion.

Reviewers: vitalybuka, eugenis, brzycki

Reviewed By: vitalybuka, brzycki

Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D58794

llvm-svn: 355203

compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt

index d898d8a..a3d0bd2 100644 (file)
@@ -12,7 +12,7 @@ set(SCUDO_UNITTEST_CFLAGS
   -I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone
   -DGTEST_HAS_RTTI=0)
 
-set(SCUDO_TEST_ARCH ${SCUDO_SUPPORTED_ARCH})
+set(SCUDO_TEST_ARCH ${SCUDO_STANDALONE_SUPPORTED_ARCH})
 
 # gtests requires c++
 set(LINK_FLAGS)
@@ -34,7 +34,7 @@ macro(add_scudo_unittest testname)
   if(COMPILER_RT_HAS_SCUDO_STANDALONE)
     foreach(arch ${SCUDO_TEST_ARCH})
       set(ScudoUnitTestsObjects)
-      add_library("RTScudoStandalone.test.${arch}"
+      add_library("RTScudoStandalone.test.${arch}" STATIC
         $<TARGET_OBJECTS:RTScudoStandalone.${arch}>)
       generate_compiler_rt_tests(ScudoUnitTestsObjects ScudoUnitTests
         "${testname}-${arch}-Test" ${arch}