diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 6087094e835..4152164a29d 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -57,9 +57,13 @@ ${name} ignored.") LINK_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") endif() - install(TARGETS ${name} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + if( EXCLUDE_FROM_ALL ) + set_target_properties(profile_rt PROPERTIES EXCLUDE_FROM_ALL ON) + else() + install(TARGETS ${name} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + endif() endif() set_target_properties(${name} PROPERTIES FOLDER "Loadable modules") diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index bcdaf8427b5..502b91dc580 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -1 +1,5 @@ +if( NOT LLVM_BUILD_RUNTIME ) + set(EXCLUDE_FROM_ALL ON) +endif() + add_subdirectory(libprofile)