[llvm] [CMake] Remove special-casing of LLVM_ENABLE_PIC on z/OS (PR #208793)
Kristina Bessonova via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 10:46:38 PDT 2026
https://github.com/chbessonova created https://github.com/llvm/llvm-project/pull/208793
Define LLVM_ENABLE_PIC unconditionally instead of excluding z/OS through a platform-specific conditional.
This removes an unnecessary special case from the top-level CMake configuration and makes the option definition consistent across platforms. The default value remains unchanged.
>From e40d8c452a1f6f405e3191770f5b45072731fd26 Mon Sep 17 00:00:00 2001
From: Kristina Bessonova <kbessonova at accesssoftek.com>
Date: Fri, 10 Jul 2026 19:43:54 +0200
Subject: [PATCH] [CMake] Remove special-casing of LLVM_ENABLE_PIC on z/OS
Define LLVM_ENABLE_PIC unconditionally instead of excluding z/OS through
a platform-specific conditional.
This removes an unnecessary special case from the top-level CMake
configuration and makes the option definition consistent across
platforms. The default value remains unchanged.
---
llvm/CMakeLists.txt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 7b8f1b3b3ced9..04f5576141efa 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -739,9 +739,7 @@ set(LLVM_TARGETS_TO_BUILD
${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD})
list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
-if (NOT CMAKE_SYSTEM_NAME MATCHES "OS390")
- option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
-endif()
+option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
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)
More information about the llvm-commits
mailing list