[llvm] 3e6ec47 - [CMake][AIX] quote the string AIX `if` conditions
David Tenty via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 20:52:44 PDT 2025
Author: David Tenty
Date: 2025-08-29T23:52:13-04:00
New Revision: 3e6ec475b756559560cba4a16c2bc755aa8caee5
URL: https://github.com/llvm/llvm-project/commit/3e6ec475b756559560cba4a16c2bc755aa8caee5
DIFF: https://github.com/llvm/llvm-project/commit/3e6ec475b756559560cba4a16c2bc755aa8caee5.diff
LOG: [CMake][AIX] quote the string AIX `if` conditions
This is a follow on to #154537, which quoted the CMAKE_SYSTEM_NAME to avoid expanding it again when that CMAKE_SYSTEM_NAME expands to AIX.
But by the same logic, we also need to quote the plain string AIX as well.
Added:
Modified:
llvm/cmake/modules/GetHostTriple.cmake
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
llvm/tools/lto/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/cmake/modules/GetHostTriple.cmake b/llvm/cmake/modules/GetHostTriple.cmake
index 2a2f84ada098f..cbecd85df5e43 100644
--- a/llvm/cmake/modules/GetHostTriple.cmake
+++ b/llvm/cmake/modules/GetHostTriple.cmake
@@ -34,7 +34,7 @@ function( get_host_triple var )
endif()
elseif( CMAKE_SYSTEM_NAME MATCHES "OS390" )
set( value "s390x-ibm-zos" )
- elseif( CMAKE_SYSTEM_NAME STREQUAL AIX )
+ elseif( CMAKE_SYSTEM_NAME STREQUAL "AIX" )
# We defer to dynamic detection of the host AIX version.
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( value "powerpc64-ibm-aix" )
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index ce7464ea1ca2b..e60ad4b5c2f5c 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -1330,7 +1330,7 @@ endif()
# linking (due to incompatibility). With MSVC, note that the plugin has to
# explicitly link against (exactly one) tool so we can't unilaterally turn on
# LLVM_ENABLE_PLUGINS when it's enabled.
-if("${CMAKE_SYSTEM_NAME}" MATCHES AIX)
+if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_OPTION OFF)
else()
set(LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_OPTION ON)
diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
index caccb62d666ce..975798a8c2636 100644
--- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -99,7 +99,7 @@ function(llvm_ExternalProject_Add name source_dir)
list(APPEND ARG_TOOLCHAIN_TOOLS flang)
endif ()
# AIX 64-bit XCOFF and big AR format is not yet supported in some of these tools.
- if(NOT _cmake_system_name STREQUAL AIX)
+ if(NOT _cmake_system_name STREQUAL "AIX")
list(APPEND ARG_TOOLCHAIN_TOOLS lld llvm-ar llvm-ranlib llvm-nm llvm-objdump)
if(_cmake_system_name STREQUAL Darwin)
list(APPEND ARG_TOOLCHAIN_TOOLS llvm-libtool-darwin llvm-lipo)
diff --git a/llvm/tools/lto/CMakeLists.txt b/llvm/tools/lto/CMakeLists.txt
index 8c7d7904e16ea..2c23e4418ac36 100644
--- a/llvm/tools/lto/CMakeLists.txt
+++ b/llvm/tools/lto/CMakeLists.txt
@@ -25,7 +25,7 @@ if(LLVM_ENABLE_PIC)
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
- if(CMAKE_SYSTEM_NAME STREQUAL AIX)
+ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
set(LTO_LIBRARY_TYPE MODULE)
set(LTO_LIBRARY_NAME libLTO)
else()
More information about the llvm-commits
mailing list