[llvm] r346127 - [CMake] Expose opt-remark tooling through libOptRemarks.dylib

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 14 09:06:33 PST 2019


On 12/21/2018 05:52 AM, Francis Visoiu Mistrih wrote:
> +CC Adam
> 
>> On 20 Dec 2018, at 23:31, Tom Stellard <tstellar at redhat.com> wrote:
>>
>> On 11/05/2018 03:57 AM, Francis Visoiu Mistrih via llvm-commits wrote:
>>> Author: thegameg
>>> Date: Mon Nov  5 03:57:44 2018
>>> New Revision: 346127
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=346127&view=rev
>>> Log:
>>> [CMake] Expose opt-remark tooling through libOptRemarks.dylib
>>>
>>> * Create an install target for it
>>> * Add it under tools/opt-remarks
>>> * Add an export file for the dylib
>>> * Install the llvm-c/OptRemarks.h header
>>> * Add an API to query its version
>>>
>>
> 
> Hi Tom,
> 
>> Hi Francis,
>>
>> Why is this library always built as a separate shared object instead
>> of being part of libLLVM.so?
> 
> This library is there to add support for parsing and handling opt-remarks for users outside LLVM (like opt-viewer, etc.).
> 
> We obviously don’t want to have the whole libLLVM.dylib just for this use case. Are you suggesting that we use libLLVM.dylib with the right LLVM_DYLIB_COMPONENTS? I can definitely look into using that if having a separate dylib is a problem here.
> 

If you configure with BUILD_SHARED_LIBS=ON, then you would get a single
shared library for each component including libOptRemarks.  Would this
work for your use case?  Also, does opt-viewer need a shared library,
or would a static library work? It's a little unorthodox to have a special
case for libOptRemarks in order to get BUILD_SHARED_LIBS=ON behavior even
when BUILD_SHARED_LIBS is set to OFF.

-Tom

> Thanks,
> 



More information about the llvm-commits mailing list