]> granicus.if.org Git - clang/commitdiff
Revert r360946 "Add Clang shared library with C++ exports"
authorNico Weber <nicolasweber@gmx.de>
Fri, 17 May 2019 01:42:37 +0000 (01:42 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 17 May 2019 01:42:37 +0000 (01:42 +0000)
It breaks LLVM_ENABLE_PIC=OFF builds, and it's not clear
if the object library approach doesn't impact the normal
clang binary.

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

cmake/modules/AddClang.cmake
tools/CMakeLists.txt
tools/clang-shlib/CMakeLists.txt [deleted file]
tools/clang-shlib/clang-shlib.cpp [deleted file]

index b598f13ff6ff487fc63fc18c77067fc164ee706b..18bac7172b229caa5ca37a73fcabe91620dbbf28 100644 (file)
@@ -81,12 +81,9 @@ macro(add_clang_library name)
       )
   endif()
   if(ARG_SHARED)
-    set(LIBTYPE SHARED)
-  else()
-    set(LIBTYPE STATIC OBJECT)
-    set_property(GLOBAL APPEND PROPERTY CLANG_STATIC_LIBS ${name})
+    set(ARG_ENABLE_SHARED SHARED)
   endif()
-  llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
+  llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
 
   if(TARGET ${name})
     target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
index f5c90ba7834d2db13427fa1543fe963948324e33..43dfffe1492e7c83896df18f1f902b78c9ae9708 100644 (file)
@@ -13,9 +13,6 @@ add_clang_subdirectory(c-index-test)
 
 add_clang_subdirectory(clang-rename)
 add_clang_subdirectory(clang-refactor)
-if(UNIX)
-  add_clang_subdirectory(clang-shlib)
-endif()
 
 if(CLANG_ENABLE_ARCMT)
   add_clang_subdirectory(arcmt-test)
diff --git a/tools/clang-shlib/CMakeLists.txt b/tools/clang-shlib/CMakeLists.txt
deleted file mode 100644 (file)
index 733ace3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-get_property(clang_libs GLOBAL PROPERTY CLANG_STATIC_LIBS)
-
-foreach (lib ${clang_libs})
-  list(APPEND _OBJECTS $<TARGET_OBJECTS:obj.${lib}>)
-  list(APPEND _DEPS $<TARGET_PROPERTY:${lib},INTERFACE_LINK_LIBRARIES>)
-endforeach ()
-
-add_clang_library(clang_shared
-                  SHARED
-                  clang-shlib.cpp
-                  ${_OBJECTS}
-                  LINK_LIBS
-                  ${_DEPS})
diff --git a/tools/clang-shlib/clang-shlib.cpp b/tools/clang-shlib/clang-shlib.cpp
deleted file mode 100644 (file)
index 0093622..0000000
+++ /dev/null
@@ -1 +0,0 @@
-// Intentionally empty source file to make CMake happy