mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
CMake: Provide LLVM_PLUGIN_EXT definition
This is needed to support the addition of tests for clang loadable plugins. In clang, plugins are built as modules (bundles on OS X) rather than dynamic libraries (dylib) so the build system needs to inform lit of the actual file extension in use, typically '.so' on Unix and '.dll' on Windows. (LLVM itself should probably switch to this scheme to fix PR14903 once and for all.) No change in build output or functionality intended. llvm-svn: 198746
This commit is contained in:
parent
1ecccf9364
commit
8a5e4a35de
@ -215,6 +215,10 @@ ${name} ignored.")
|
||||
LINK_FLAGS " -Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
|
||||
endif()
|
||||
|
||||
if (MODULE)
|
||||
set_property(TARGET ${name} PROPERTY SUFFIX ${LLVM_PLUGIN_EXT})
|
||||
endif ()
|
||||
|
||||
if( EXCLUDE_FROM_ALL )
|
||||
set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
|
||||
else()
|
||||
|
@ -49,8 +49,6 @@ if(WIN32)
|
||||
set(LLVM_ON_WIN32 1)
|
||||
set(LLVM_ON_UNIX 0)
|
||||
endif(CYGWIN)
|
||||
set(LTDL_SHLIB_EXT ".dll")
|
||||
set(EXEEXT ".exe")
|
||||
# Maximum path length is 160 for non-unicode paths
|
||||
set(MAXPATHLEN 160)
|
||||
else(WIN32)
|
||||
@ -59,12 +57,9 @@ else(WIN32)
|
||||
set(LLVM_ON_UNIX 1)
|
||||
if(APPLE)
|
||||
set(LLVM_HAVE_LINK_VERSION_SCRIPT 0)
|
||||
set(LTDL_SHLIB_EXT ".dylib")
|
||||
else(APPLE)
|
||||
set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
|
||||
set(LTDL_SHLIB_EXT ".so")
|
||||
endif(APPLE)
|
||||
set(EXEEXT "")
|
||||
# FIXME: Maximum path length is currently set to 'safe' fixed value
|
||||
set(MAXPATHLEN 2024)
|
||||
else(UNIX)
|
||||
@ -72,6 +67,10 @@ else(WIN32)
|
||||
endif(UNIX)
|
||||
endif(WIN32)
|
||||
|
||||
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
set(LTDL_SHLIB_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_MODULE_SUFFIX})
|
||||
|
||||
function(add_flag_or_print_warning flag)
|
||||
check_c_compiler_flag(${flag} C_SUPPORTS_FLAG)
|
||||
check_cxx_compiler_flag(${flag} CXX_SUPPORTS_FLAG)
|
||||
|
Loading…
Reference in New Issue
Block a user