[Mlir-commits] [mlir] f879da7 - [mlir-cpu-runner] Pass --exclude-libs to linker when building runner (#122329)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Jan 14 04:55:24 PST 2025
Author: Andrea Faulds
Date: 2025-01-14T13:55:21+01:00
New Revision: f879da799b4e112d79243dde6d299259d8359eeb
URL: https://github.com/llvm/llvm-project/commit/f879da799b4e112d79243dde6d299259d8359eeb
DIFF: https://github.com/llvm/llvm-project/commit/f879da799b4e112d79243dde6d299259d8359eeb.diff
LOG: [mlir-cpu-runner] Pass --exclude-libs to linker when building runner (#122329)
This fixes a conflict between the version of LLVM linked against by the
runner and the unrelated version of LLVM that may be dynamically loaded
by a graphics driver. (Relevant to #73457: fixes loading certain Vulkan
drivers.)
Added:
Modified:
mlir/tools/mlir-cpu-runner/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/tools/mlir-cpu-runner/CMakeLists.txt b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
index 811583b97bc71d..f6ed2ed414647c 100644
--- a/mlir/tools/mlir-cpu-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
@@ -26,3 +26,10 @@ target_link_libraries(mlir-cpu-runner PRIVATE
MLIRExecutionEngine
MLIRJitRunner
)
+target_link_options(mlir-cpu-runner
+ PRIVATE
+ # On Linux, disable re-export of any static linked libraries that came
+ # through. This prevents our LLVM build from interfering with the version of
+ # LLVM included in certain graphics drivers.
+ $<$<PLATFORM_ID:Linux>:LINKER:--exclude-libs,ALL>
+)
More information about the Mlir-commits
mailing list