Skip to content

Commit 034912d

Browse files
authored
[SystemZ][z/OS] Build in ASCII 64 bit mode on z/OS (#90630)
Setting the correct build flags on z/OS to build LLVM as 64-bit ASCII application.
1 parent 68b863b commit 034912d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,11 @@ if (CMAKE_SYSTEM_NAME MATCHES "OS390")
11581158
add_compile_definitions(_OPEN_SYS_FILE_EXT) # Needed for EBCDIC I/O.
11591159
add_compile_definitions(_EXT) # Needed for file data.
11601160
add_compile_definitions(_UNIX03_THREADS) # Multithreading support.
1161+
# Need to build LLVM as ASCII application.
1162+
# This can't be a global setting because other projects may
1163+
# need to be built in EBCDIC mode.
1164+
append("-fzos-le-char-mode=ascii" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
1165+
append("-m64" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
11611166
endif()
11621167

11631168
# Build with _FILE_OFFSET_BITS=64 on Solaris to match g++ >= 9.

0 commit comments

Comments
 (0)