[CMake] LLVM_PLUGIN_EXT: Use CMAKE_SHARED_LIBRARY_SUFFIX rather than CMAKE_SHARED_MOD...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 13 Feb 2014 11:19:00 +0000 (11:19 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 13 Feb 2014 11:19:00 +0000 (11:19 +0000)
FIXME: llvm/test may be aware of LLVM_PLUGIN_EXT, like as clang/test does.
FIXME: CMAKE_*_SUFFIX may be set in HandleLLVMOptions if those variables could be writable, rather than to set one as target properties.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201316 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/HandleLLVMOptions.cmake

index 9cb39ff..ebe9d86 100644 (file)
@@ -101,7 +101,9 @@ endif(WIN32)
 
 set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
 set(LTDL_SHLIB_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
-set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_MODULE_SUFFIX})
+
+# We use *.dylib rather than *.so on darwin.
+set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
 
 function(add_flag_or_print_warning flag)
   check_c_compiler_flag(${flag} C_SUPPORTS_FLAG)