[cfe-dev] Install Problem of Compiler-rt with Visual Studio Express 2013 for Windows Desktop

Brad King brad.king at kitware.com
Thu Mar 6 07:16:21 PST 2014


On 03/06/2014 09:59 AM, Feng Lu wrote:
> The actual location is in
> C:/llvm/build/Release/lib/clang/3.5.0/lib/windows/Release/clang_rt.asan-i386.lib
> which just replaces $(Configuration) as Release.
> 
> On Wed, Mar 5, 2014 at 11:56 PM, Alexey Samsonov wrote:
>> Brad, do you think we should fix add_compiler_rt_static_runtime
>> for multi-configuration generators
>> in the same way you fixed add_sanitizer_rt_symbols recently?

Actually this one is a different problem.  The install(TARGETS)
command is used so it should know the proper location of the file.
However, it looks like ${CMAKE_CFG_INTDIR} is ending up in target
output directory properties.  This is not correct.  The target
output directory properties should be plain paths with no native
build-system macros or placeholders, like $(Configuration) in this
case.

The set_output_directory function in AddLLVM properly replaces
that placeholder and sets per-configuration output directory
properties correctly.  AddCompilerRT.cmake is using the value
directly in ARCHIVE_OUTPUT_DIRECTORY an LIBRARY_OUTPUT_DIRECTORY.
That causes this problem.

Much of this could be cleaned up throughout LLVM by avoiding use
of ${CMAKE_CFG_INTDIR} and using generator expressions like
$<TARGET_FILE> to refer to target locations instead.  This quick
fix for compiler-rt though is to adopt set_output_directory.

-Brad




More information about the cfe-dev mailing list