[llvm] 1426ac0 - [gn build] Fix COMPILER_RT_HAS_* defines for libclang_rt.profile

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 11:30:07 PDT 2020


Author: Nico Weber
Date: 2020-09-02T14:29:59-04:00
New Revision: 1426ac0482951d4cb98f84ab9fc89c745f95602e

URL: https://github.com/llvm/llvm-project/commit/1426ac0482951d4cb98f84ab9fc89c745f95602e
DIFF: https://github.com/llvm/llvm-project/commit/1426ac0482951d4cb98f84ab9fc89c745f95602e.diff

LOG: [gn build] Fix COMPILER_RT_HAS_* defines for libclang_rt.profile

The cmake build uses COMPILER_RT_TARGET_HAS_* in the CMakeLists.txt
but then translates it to -DCOMPILER_RT_HAS_* flags which the
c++ code checks for. So we need to define the latter, not the former.

Added: 
    

Modified: 
    llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn
index 77e2b6d218f7..5fab007153e4 100644
--- a/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn
@@ -64,9 +64,9 @@ static_library("profile") {
 
   if (current_os != "win") {
     defines = [
-      "COMPILER_RT_TARGET_HAS_ATOMICS",
-      "COMPILER_RT_TARGET_HAS_FCNTL_LCK",
-      "COMPILER_RT_TARGET_HAS_UNAME",
+      "COMPILER_RT_HAS_UNAME",
+      "COMPILER_RT_HAS_ATOMICS",
+      "COMPILER_RT_HAS_FCNTL_LCK",
     ]
   }
 }


        


More information about the llvm-commits mailing list