Source code

Revision control

Copy as Markdown

Other Tools

From c294bdd64768e0954e7dec8ed878bdac7ce7530f Mon Sep 17 00:00:00 2001
From: Fangrui Song <i@maskray.me>
Date: Thu, 2 Feb 2023 14:51:35 -0800
Subject: [PATCH] libLTO.{so,dylib}: remove unused non-LTO symbols
These dissembler symbols are not used by LTO (see Apple ld64's use
in check-llvm-tools-lto). On ELF platforms, these symbols are not defined and are
rejected by ld --no-undefined-version.
I think this is a more proper solution than D139932 and this fixes
-DBUILD_SHARED_LIBS=on for ELF as well.
(The hunks removing llvm/tools/lto/lto.dylib.exports and the associated
CMake conditional are dropped, as D139932 was never applied here.)
---
llvm/tools/lto/lto.exports | 6 ------
1 file changed, 6 deletions(-)
diff --git a/llvm/tools/lto/lto.exports b/llvm/tools/lto/lto.exports
index 3abae5f0fcba..4164c3919a97 100644
--- a/llvm/tools/lto/lto.exports
+++ b/llvm/tools/lto/lto.exports
@@ -45,12 +45,6 @@ lto_codegen_compile_optimized
lto_codegen_set_should_internalize
lto_codegen_set_should_embed_uselists
lto_set_debug_options
-LLVMCreateDisasm
-LLVMCreateDisasmCPU
-LLVMDisasmDispose
-LLVMDisasmInstruction
-LLVMSetDisasmOptions
-LLVMCreateDisasmCPUFeatures
thinlto_create_codegen
thinlto_codegen_dispose
thinlto_codegen_add_module
--
2.47.3