[llvm] [llvm] Disable some LLVM arguments in runtimes mode (PR #73031)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 14:10:13 PST 2023
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/73031
>From d4a872911989b02c9d5bee92161b6d480d31ed5a Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Tue, 21 Nov 2023 14:06:38 -0600
Subject: [PATCH] [llvm] Disable some LLVM arguments in runtimes mode
Summary:
There are a few default options that LLVM adds that can be problematic
for runtimes builds. These options are generally intended to handle
building LLVM itself, but are also added when building in a runtimes
mode. One such issue I've run into is that in `libc` we deliberately use
`--target` to use a different device toolchain, which doesn't support
some linker arguments passed via `-Wl`. This is observed in
https://github.com/llvm/llvm-project/pull/73030 when attempting to use
these options.
---
runtimes/CMakeLists.txt | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 010ec879e44a322..d2ed041c8b754d4 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -151,9 +151,11 @@ endif()
# Avoid checking whether the compiler is working.
set(LLVM_COMPILER_CHECKED ON)
+# This can be used to detect whether we're in the runtimes build.
+set(LLVM_RUNTIMES_BUILD ON)
+
# Handle common options used by all runtimes.
include(AddLLVM)
-include(HandleLLVMOptions)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
@@ -179,9 +181,6 @@ if(CMAKE_HOST_APPLE AND APPLE)
include(UseLibtool)
endif()
-# This can be used to detect whether we're in the runtimes build.
-set(LLVM_RUNTIMES_BUILD ON)
-
foreach(entry ${runtimes})
get_filename_component(projName ${entry} NAME)
More information about the llvm-commits
mailing list