[llvm] [SystemZ][z/OS] Build in ASCII 64 bit mode on z/OS (PR #90630)

Fanbo Meng via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 10:26:22 PDT 2024


https://github.com/fanbo-meng created https://github.com/llvm/llvm-project/pull/90630

Setting the correct build flags on z/OS to build LLVM as 64-bit ASCII application.

>From c9c42d291f0eab89977c8d4f82b07e03b064e8ce Mon Sep 17 00:00:00 2001
From: Fanbo Meng <Fanbo.Meng at ibm.com>
Date: Tue, 30 Apr 2024 11:08:18 -0400
Subject: [PATCH] [SystemZ][z/OS] Build in ASCII 64 bit mode on z/OS

Setting the correct build flags on z/OS to build LLVM as 64-bit ASCII application.
---
 llvm/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 43181af3bc1953..4821ec4aa7a1bd 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1156,6 +1156,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 build 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.



More information about the llvm-commits mailing list