[PATCH] D97335: [Orc] Add JITLink debug support plugin for ELF x86-64
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 2 12:58:13 PST 2021
thakis added a comment.
I see you've now disabled this on Windows. I think it works on Windows with
diff --git a/llvm/tools/llvm-jitlink/CMakeLists.txt b/llvm/tools/llvm-jitlink/CMakeLists.txt
index 8d511b17fca2..34e892f30ed6 100644
--- a/llvm/tools/llvm-jitlink/CMakeLists.txt
+++ b/llvm/tools/llvm-jitlink/CMakeLists.txt
@@ -24,4 +24,16 @@ add_llvm_tool(llvm-jitlink
llvm-jitlink-macho.cpp
)
+# export_executable_symbols() is a no-op on Windows if neither
+# LLVM_EXPORTED_SYMBOL_FILE nor LLVM_EXPORT_SYMBOLS_FOR_PLUGINS are set, but
+# the jitlink tests need llvm_orc_registerJITLoaderGDBWrapper to be exported
+# from the executable to work.
+# FIXME: Find a better workaround. Maybe this should use LLVM_EXPORTED_SYMBOL_FILE
+# and an .exports file now that the binary has a required export.
+if (WIN32)
+ target_link_options(llvm-jitlink PRIVATE
+ "/export:llvm_orc_registerJITLoaderGDBWrapper"
+ )
+endif()
+
export_executable_symbols(llvm-jitlink)
but as the comment says, setting LLVM_EXPORTED_SYMBOL_FILE seems like it'd probably be a nicer fix.
(But I don't have a problem with this being disabled on Windows.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97335/new/
https://reviews.llvm.org/D97335
More information about the llvm-commits
mailing list