From 79b03306af5c11d354fa90db8bfd7818cd811ef5 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 27 Nov 2023 08:12:32 -0600 Subject: [PATCH] [llvm] Disable HandleLLVMOptions in runtimes mode (#73031) 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. This patch completely removes these default arguments. The consensus is that any issues created by this patch should ultimately be solved on a per-runtime basis. --- runtimes/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 010ec879e44a..603a3289c27b 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -151,9 +151,7 @@ endif() # Avoid checking whether the compiler is working. set(LLVM_COMPILER_CHECKED ON) -# Handle common options used by all runtimes. include(AddLLVM) -include(HandleLLVMOptions) find_package(Python3 REQUIRED COMPONENTS Interpreter)