[LLVMdev] Using thin archives when building llvm
Brad King
brad.king at kitware.com
Wed Jul 22 08:51:37 PDT 2015
On 07/22/2015 11:38 AM, Rafael EspĂndola wrote:
> the simplest way to reproduce the problem is to run
>
> cmake ..\llvm -G Ninja -DCMAKE_CXX_CREATE_STATIC_LIBRARY=foobar -DCMAKE_LINKER=c:\users\espindola\llvm\inst\bin\lld-link2
The Modules/Platform/Windows-MSVC.cmake module unconditionally
sets CMAKE_CXX_CREATE_STATIC_LIBRARY and uses CMAKE_LINKER.
As mentioned earlier the CMAKE_<LANG>_CREATE_STATIC_LIBRARY
and similar variables are internal implementation details
that are not meant to be set by users or project code. That
is why the above works only on certain platforms.
Will thin archive support be distributed as part of llvm-ar
proper for general use or is this only for LLVM's own build?
If it will be for general use then it may also be worthwhile
teaching CMake this option directly.
-Brad
More information about the llvm-dev
mailing list