diff options
| author | Hans Wennborg <hans@hanshq.net> | 2014-12-04 21:01:49 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2014-12-04 21:01:49 +0000 |
| commit | 217cf22cf64cc32430e782addff6d2fe71a7f874 (patch) | |
| tree | 1f4bf521f3773dc159c63adf359937519247ed8c | |
| parent | 19048871b213e654e53c04edd65236698bf60a58 (diff) | |
| download | bcm5719-llvm-217cf22cf64cc32430e782addff6d2fe71a7f874.tar.gz bcm5719-llvm-217cf22cf64cc32430e782addff6d2fe71a7f874.zip | |
CMake: build DLLs in the right directory and include them in the 'install' target (PR21719)
When CMake builds a dynamic library on Windows, the .dll file's location is
determined by the RUNTIME_OUTPUT_DIRECTORY, which we were previously not
setting.
This means for example that clang_rt.asan_dynamic-i386.dll will get built
and installed in the same directory as the corresponding .lib file,
instead of being built in the bin/ directory and not installed at all.
Differential Revision: http://reviews.llvm.org/D6508
llvm-svn: 223387
| -rw-r--r-- | compiler-rt/cmake/Modules/AddCompilerRT.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake index aafccd47ddc..3edd854fdee 100644 --- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake +++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake @@ -59,7 +59,8 @@ macro(add_compiler_rt_runtime name arch type) # Setup correct output directory in the build tree. set_target_properties(${name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} - LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) + LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} + RUNTIME_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) if ("${LIB_OUTPUT_NAME}" STREQUAL "") set_target_properties(${name} PROPERTIES OUTPUT_NAME ${name}${COMPILER_RT_OS_SUFFIX}) @@ -70,7 +71,8 @@ macro(add_compiler_rt_runtime name arch type) # Add installation command. install(TARGETS ${name} ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} - LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) + LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} + RUNTIME DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) else() message(FATAL_ERROR "Archtecture ${arch} can't be targeted") endif() |

