[PATCH] D135402: [LLD] Enable --no-undefined-version by default.
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 13 15:22:46 PDT 2022
jhuber6 added a comment.
In D135402#3857039 <https://reviews.llvm.org/D135402#3857039>, @MaskRay wrote:
> AFAICT openmp uses an incorrect version script where some exact patterns don't match symbols. This is error-prone but before this default switch it was unnoticed.
Yes, I originally attempted to rectify the offending version scripts. The only difficult one to rectify is the one for `libomp`. This is because some symbols are only defined in a debug build, or some other configuration, it contains lines like this.
#if USE_DEBUGGER
__kmp_debugging;
__kmp_omp_debug_struct_info;
#endif /* USE_DEBUGGER */
What would you suggest for solving this? Should we just include dummy symbols in the case that these symbols aren't included?
Also, I mentioned previously in this thread the errors I was getting with the `lto` version script. Do you happen to know why these aren't defined?
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
> If you use `--no-undefined-version` with GNU ld, you likely get similar errors.
>
> "drop-in replacement" does not mean ld.lld copies every behavior of GNU ld. We consider many factors and what default makes the most sense.
> I've made comments why the new default makes more sense and I don't want to repeat.
I'm fine with the philosophy and this patch, but I don't want the OpenMP builds to be totally broken until we fix it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135402/new/
https://reviews.llvm.org/D135402
More information about the llvm-commits
mailing list