Skip to content

Commit 3e6ec47

Browse files
committed
[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.
1 parent c168ce2 commit 3e6ec47

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

llvm/cmake/modules/GetHostTriple.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function( get_host_triple var )
3434
endif()
3535
elseif( CMAKE_SYSTEM_NAME MATCHES "OS390" )
3636
set( value "s390x-ibm-zos" )
37-
elseif( CMAKE_SYSTEM_NAME STREQUAL AIX )
37+
elseif( CMAKE_SYSTEM_NAME STREQUAL "AIX" )
3838
# We defer to dynamic detection of the host AIX version.
3939
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
4040
set( value "powerpc64-ibm-aix" )

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ endif()
13301330
# linking (due to incompatibility). With MSVC, note that the plugin has to
13311331
# explicitly link against (exactly one) tool so we can't unilaterally turn on
13321332
# LLVM_ENABLE_PLUGINS when it's enabled.
1333-
if("${CMAKE_SYSTEM_NAME}" MATCHES AIX)
1333+
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
13341334
set(LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_OPTION OFF)
13351335
else()
13361336
set(LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_OPTION ON)

llvm/cmake/modules/LLVMExternalProjectUtils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function(llvm_ExternalProject_Add name source_dir)
9999
list(APPEND ARG_TOOLCHAIN_TOOLS flang)
100100
endif ()
101101
# AIX 64-bit XCOFF and big AR format is not yet supported in some of these tools.
102-
if(NOT _cmake_system_name STREQUAL AIX)
102+
if(NOT _cmake_system_name STREQUAL "AIX")
103103
list(APPEND ARG_TOOLCHAIN_TOOLS lld llvm-ar llvm-ranlib llvm-nm llvm-objdump)
104104
if(_cmake_system_name STREQUAL Darwin)
105105
list(APPEND ARG_TOOLCHAIN_TOOLS llvm-libtool-darwin llvm-lipo)

llvm/tools/lto/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if(LLVM_ENABLE_PIC)
2525

2626
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
2727

28-
if(CMAKE_SYSTEM_NAME STREQUAL AIX)
28+
if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
2929
set(LTO_LIBRARY_TYPE MODULE)
3030
set(LTO_LIBRARY_NAME libLTO)
3131
else()

0 commit comments

Comments
 (0)