aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFanbo Meng <fanbo.meng@ibm.com>2024-05-01 08:13:10 -0400
committerGitHub <noreply@github.com>2024-05-01 08:13:10 -0400
commit034912d583617a7029c8efaade4422eaa4593f8c (patch)
tree6cdf5b99ab4481c7562586c9be1322d68f669498
parent68b863b7fa68a196bcc02d12c028dea7dcd9b97b (diff)
downloadllvm-034912d583617a7029c8efaade4422eaa4593f8c.zip
llvm-034912d583617a7029c8efaade4422eaa4593f8c.tar.gz
llvm-034912d583617a7029c8efaade4422eaa4593f8c.tar.bz2
[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.
-rw-r--r--llvm/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 9163729..b7b1589 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1158,6 +1158,11 @@ if (CMAKE_SYSTEM_NAME MATCHES "OS390")
add_compile_definitions(_OPEN_SYS_FILE_EXT) # Needed for EBCDIC I/O.
add_compile_definitions(_EXT) # Needed for file data.
add_compile_definitions(_UNIX03_THREADS) # Multithreading support.
+ # Need to build LLVM as ASCII application.
+ # This can't be a global setting because other projects may
+ # need to be built in EBCDIC mode.
+ append("-fzos-le-char-mode=ascii" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
+ append("-m64" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
endif()
# Build with _FILE_OFFSET_BITS=64 on Solaris to match g++ >= 9.