mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-19 18:24:05 +00:00
CMake: Add Darwin-specific linker flags for building loadable modules
llvm-svn: 86684
This commit is contained in:
parent
732a2ed037
commit
852c7d16df
@ -27,10 +27,16 @@ macro(add_llvm_loadable_module name)
|
||||
message(STATUS "Loadable modules not supported on this platform.
|
||||
${name} ignored.")
|
||||
else()
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
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})
|
||||
|
Loading…
x
Reference in New Issue
Block a user