[libc-commits] [libc] ae5c825 - [libc][Obvious] Do not add __NO_ to targets with FLAG__NO suffix.

Tue Ly via libc-commits libc-commits at lists.llvm.org
Thu Jun 30 07:46:09 PDT 2022


Author: Tue Ly
Date: 2022-06-30T10:45:59-04:00
New Revision: ae5c82502eafd593f265df425b538c3195c082de

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

LOG: [libc][Obvious] Do not add __NO_ to targets with FLAG__NO suffix.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCLibraryRules.cmake
    libc/cmake/modules/LLVMLibCObjectRules.cmake
    libc/cmake/modules/LLVMLibCTestRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index a50bb8a47a17f..ba5ac33b1e7a4 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -231,7 +231,7 @@ function(expand_flags_for_header_library target_name flags)
 
   # Only target with `flag` has `.__NO_flag` target, `flag__NO` and
   # `flag__ONLY` do not.
-  if(NOT "${modifier}")
+  if("${modifier}" STREQUAL "")
     set(TARGET_NAME "${target_name}.__NO_${flag}")
   else()
     set(TARGET_NAME "${target_name}")

diff  --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 496c8ba97a930..760a8cb9e27ee 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -150,7 +150,7 @@ function(expand_flags_for_object_library target_name flags)
 
   # Only target with `flag` has `.__NO_flag` target, `flag__NO` and
   # `flag__ONLY` do not.
-  if(NOT "${modifier}")
+  if("${modifier}" STREQUAL "")
     set(TARGET_NAME "${target_name}.__NO_${flag}")
   else()
     set(TARGET_NAME "${target_name}")
@@ -466,7 +466,7 @@ function(expand_flags_for_entrypoint_object target_name flags)
 
   # Only target with `flag` has `.__NO_flag` target, `flag__NO` and
   # `flag__ONLY` do not.
-  if(NOT "${modifier}")
+  if("${modifier}" STREQUAL "")
     set(TARGET_NAME "${target_name}.__NO_${flag}")
   else()
     set(TARGET_NAME "${target_name}")

diff  --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 336c422198738..a5f789d1e1f95 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -236,7 +236,7 @@ function(expand_flags_for_libc_unittest target_name flags)
 
   # Only target with `flag` has `.__NO_flag` target, `flag__NO` and
   # `flag__ONLY` do not.
-  if(NOT "${modifier}")
+  if("${modifier}" STREQUAL "")
     set(TARGET_NAME "${target_name}.__NO_${flag}")
   else()
     set(TARGET_NAME "${target_name}")


        


More information about the libc-commits mailing list