diff options
author | Abhina Sree <69635948+abhina-sree@users.noreply.github.com> | 2023-12-07 15:04:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 15:04:56 -0500 |
commit | 50ed0ba285bf07632ddee0dec743c26b0442c4cc (patch) | |
tree | 57d4e8a44aa2786a5426cfa5ddd275252f89dd4e | |
parent | 097d2f14173a3bfc1cd44f543f63154fed79e962 (diff) | |
download | llvm-50ed0ba285bf07632ddee0dec743c26b0442c4cc.zip llvm-50ed0ba285bf07632ddee0dec743c26b0442c4cc.tar.gz llvm-50ed0ba285bf07632ddee0dec743c26b0442c4cc.tar.bz2 |
[SystemZ/ZOS] Additions to the build system. (#74730)
This change extend the CMake files with the necessary additions to build LLVM for z/OS.
-rw-r--r-- | llvm/CMakeLists.txt | 6 | ||||
-rw-r--r-- | llvm/lib/Transforms/Hello/CMakeLists.txt | 2 | ||||
-rw-r--r-- | llvm/tools/bugpoint-passes/CMakeLists.txt | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-shlib/CMakeLists.txt | 3 |
4 files changed, 10 insertions, 3 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 1c983165..abe415f 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -581,7 +581,9 @@ set(LLVM_TARGETS_TO_BUILD ${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}) list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD) -option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON) +if (NOT CMAKE_SYSTEM_NAME MATCHES "OS390") + option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON) +endif() option(LLVM_ENABLE_MODULES "Compile with C++ modules enabled." OFF) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") option(LLVM_ENABLE_MODULE_DEBUGGING "Compile with -gmodules." ON) @@ -1127,6 +1129,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "OS390") add_compile_definitions(_XOPEN_SOURCE=600) add_compile_definitions(_OPEN_SYS) # Needed for process information. add_compile_definitions(_OPEN_SYS_FILE_EXT) # Needed for EBCDIC I/O. + add_compile_definitions(_EXT) # Needed for file data. + add_compile_definitions("-D_UNIX03_THREADS") # Multithreading support. endif() # Build with _FILE_OFFSET_BITS=64 on Solaris to match g++ >= 9. diff --git a/llvm/lib/Transforms/Hello/CMakeLists.txt b/llvm/lib/Transforms/Hello/CMakeLists.txt index c4f1024..9510c31 100644 --- a/llvm/lib/Transforms/Hello/CMakeLists.txt +++ b/llvm/lib/Transforms/Hello/CMakeLists.txt @@ -6,7 +6,7 @@ if( NOT LLVM_REQUIRES_RTTI ) endif() endif() -if(WIN32 OR CYGWIN) +if(WIN32 OR CYGWIN OR ZOS) set(LLVM_LINK_COMPONENTS Core Support) endif() diff --git a/llvm/tools/bugpoint-passes/CMakeLists.txt b/llvm/tools/bugpoint-passes/CMakeLists.txt index 6df49d7..60fc1bd 100644 --- a/llvm/tools/bugpoint-passes/CMakeLists.txt +++ b/llvm/tools/bugpoint-passes/CMakeLists.txt @@ -10,7 +10,7 @@ if( NOT LLVM_REQUIRES_RTTI ) endif() endif() -if(WIN32 OR CYGWIN) +if(WIN32 OR CYGWIN OR ZOS) set(LLVM_LINK_COMPONENTS Core Support) endif() diff --git a/llvm/tools/llvm-shlib/CMakeLists.txt b/llvm/tools/llvm-shlib/CMakeLists.txt index 8ace190..5079316 100644 --- a/llvm/tools/llvm-shlib/CMakeLists.txt +++ b/llvm/tools/llvm-shlib/CMakeLists.txt @@ -14,6 +14,9 @@ if(LLVM_BUILD_LLVM_DYLIB) if(MSVC) message(FATAL_ERROR "Generating libLLVM is not supported on MSVC") endif() + if(ZOS) + message(FATAL_ERROR "Generating libLLVM is not supported on z/OS") + endif() llvm_map_components_to_libnames(LIB_NAMES ${LLVM_DYLIB_COMPONENTS}) |