[llvm] [SystemZ/ZOS] Additions to the build system. (PR #74730)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 08:15:14 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Abhina Sree (abhina-sree)
<details>
<summary>Changes</summary>
This change extend the CMake files with the necessary additions to build LLVM for z/OS.
---
Full diff: https://github.com/llvm/llvm-project/pull/74730.diff
4 Files Affected:
- (modified) llvm/CMakeLists.txt (+3-1)
- (modified) llvm/lib/Transforms/Hello/CMakeLists.txt (+1-1)
- (modified) llvm/tools/bugpoint-passes/CMakeLists.txt (+1-1)
- (modified) llvm/tools/llvm-shlib/CMakeLists.txt (+3)
``````````diff
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 1c983165b2ef00..1d8f5f41434aa3 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 ZOS)
+ 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)
diff --git a/llvm/lib/Transforms/Hello/CMakeLists.txt b/llvm/lib/Transforms/Hello/CMakeLists.txt
index c4f10247c1a6cc..9510c31f633fe8 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 6df49d7abd8809..60fc1bde513710 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 8ace190b28f744..5079316533d374 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})
``````````
</details>
https://github.com/llvm/llvm-project/pull/74730
More information about the llvm-commits
mailing list