[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
Wed May 1 05:12:41 PDT 2024
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/90630
>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 1/2] [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.
>From c0395870b872332950a42f41dca8ed5b2bf060f5 Mon Sep 17 00:00:00 2001
From: Fanbo Meng <fanbo.meng at ibm.com>
Date: Wed, 1 May 2024 08:12:34 -0400
Subject: [PATCH 2/2] improve comment
Co-authored-by: zibi2 <62662650+zibi2 at users.noreply.github.com>
---
llvm/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 4821ec4aa7a1bd..c06e661573ed42 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1158,7 +1158,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "OS390")
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.
+ # 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()
More information about the llvm-commits
mailing list