diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
commit | d2e985fd323c167e20f77b045a1d99ad166e65db (patch) | |
tree | 6a111e552c75afc66228e3d8f19b6731e4013f10 /cmake/modules/AddLLVM.cmake | |
parent | ded64d5d348ce8d8c5aa42cf63f6de9dd84b7e89 (diff) | |
download | FreeBSD-src-d2e985fd323c167e20f77b045a1d99ad166e65db.zip FreeBSD-src-d2e985fd323c167e20f77b045a1d99ad166e65db.tar.gz |
Update LLVM to r89205.
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 205ddb7..c0ce897 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -22,6 +22,28 @@ macro(add_llvm_library name) endmacro(add_llvm_library name) +macro(add_llvm_loadable_module name) + if( NOT LLVM_ON_UNIX ) + message(STATUS "Loadable modules not supported on this platform. +${name} ignored.") + else() + llvm_process_sources( ALL_FILES ${ARGN} ) + add_library( ${name} MODULE ${ALL_FILES} ) + set_target_properties( ${name} PROPERTIES PREFIX "" ) + + if (APPLE) + # Darwin-specific linker flags for loadable modules. + set_target_properties(${name} PROPERTIES + 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}) + endif() +endmacro(add_llvm_loadable_module name) + + macro(add_llvm_executable name) llvm_process_sources( ALL_FILES ${ARGN} ) add_executable(${name} ${ALL_FILES}) |