[compiler-rt] Do not add 'ubsan' unconditionally to target dependencies

Xan López via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 03:51:28 PDT 2015


Patch commit message pretty much says it all. This fixes a bunch of
warnings when generating the CMake build files.
-------------- next part --------------
>From 251fc2034755d35b79e19032b4db48ff7e64754a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Xan=20L=C3=B3pez?= <xan at igalia.com>
Date: Mon, 28 Sep 2015 12:36:07 +0200
Subject: [PATCH] [CMake] Do not add 'ubsan' unconditonally to target
 dependencies

It is not available in all architectures (like Solaris/sparc), so
protect it with the right if guard.
---
 test/cfi/CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/cfi/CMakeLists.txt b/test/cfi/CMakeLists.txt
index 0967295..4c846cc 100644
--- a/test/cfi/CMakeLists.txt
+++ b/test/cfi/CMakeLists.txt
@@ -7,8 +7,12 @@ set(CFI_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
 if(NOT COMPILER_RT_STANDALONE_BUILD)
   list(APPEND CFI_TEST_DEPS
     opt
-    ubsan
   )
+  if (COMPILER_RT_HAS_SANITIZER_COMMON)
+    list(APPEND CFI_TEST_DEPS
+      ubsan
+    )
+  endif()
   if(LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR)
     list(APPEND CFI_TEST_DEPS
       LLVMgold
-- 
2.4.3



More information about the llvm-commits mailing list