[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.
diff --git a/llvm/cmake/modules/GetHostTriple.cmake b/llvm/cmake/modules/GetHostTriple.cmake
index 2a2f84a..cbecd85 100644
--- a/llvm/cmake/modules/GetHostTriple.cmake
+++ b/llvm/cmake/modules/GetHostTriple.cmake
@@ -34,7 +34,7 @@
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 ce7464e..e60ad4b 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -1330,7 +1330,7 @@
# 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 caccb62..975798a 100644
--- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -99,7 +99,7 @@
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 8c7d790..2c23e44 100644
--- a/llvm/tools/lto/CMakeLists.txt
+++ b/llvm/tools/lto/CMakeLists.txt
@@ -25,7 +25,7 @@
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()