[PATCH] D12488: Enable linking tools, shared libraries against libLLVM
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 14:07:29 PDT 2015
rnk added inline comments.
================
Comment at: tools/llvm-shlib/CMakeLists.txt:71
@@ -48,2 +70,3 @@
+
if(NOT DEFINED LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
----------------
beanz wrote:
> rnk wrote:
> > @beanz Why is this code even generating export lists if it wants to export everything? The default Unix behavior is to export all default visibility symbols from shared objects. Here's how I'd structure it:
> > ```
> > set(LLVM_EXPORTED_SYMBOL_FILE)
> > if (DEFINED LLVM_LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
> > set(LLVM_EXPORTED_SYMBOL_FILE ${LLVM_DYLIB_EXPORTED_SYMBOL_FILE})
> > add_custom_target(libLLVMExports DEPENDS ${LLVM_EXPORTED_SYMBOL_FILE})
> > elseif (NOT LLVM_DYLIB_EXPORT_ALL)
> > # ... C API generation code here
> > endif()
> > ```
> >
> > If LLVM_EXPORTED_SYMBOL_FILE is empty, add_llvm_library won't pass it in.
> In my mind 'all' was to export everything LLVM, and we have some random things that aren't in the llvm namespace that I wanted to exclude.
>
> If that doesn't make sense to other people, feel free to change it.
I'd rather go with the tool defaults over custom shell commands. :)
http://reviews.llvm.org/D12488
More information about the llvm-commits
mailing list