Files
llvm12/link-clang-shared.patch
Richard Biener 69df4a4e1d Accepting request 886367 from home:aaronpuchert:llvm-next
- Update to version 12.0.0.
  * For details, see the release notes:
    - https://releases.llvm.org/12.0.0/docs/ReleaseNotes.html
    - https://releases.llvm.org/12.0.0/tools/clang/docs/ReleaseNotes.html
    - https://releases.llvm.org/12.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html
    - https://releases.llvm.org/12.0.0/projects/libcxx/docs/ReleaseNotes.html
    - https://releases.llvm.org/12.0.0/tools/lld/docs/ReleaseNotes.html
- Rebase patches:
  * assume-opensuse.patch
  * lldb-cmake.patch
  * llvm-better-detect-64bit-atomics-support.patch
  * llvm-do-not-install-static-libraries.patch
  * llvm_build_tablegen_component_as_shared_library.patch
- Drop patches that have landed upstream:
  * Fix-missing-include.patch
- Always use ld.bfd for stage 1, use lld for stage 2 where we use
  ThinLTO and where it's supported, gold where lld doesn't work,
  and ld.bfd where we don't use ThinLTO. (boo#1181621)
- Add lld-no-version-on-undefined-weak-lazy-symbols.patch to fix a
  bug in lld that made libLLVM.so contain a corrupt symbol version.
- Add clangd-cmake-non-standard-layout.patch to fix build in our
  non-monorepo layout.

OBS-URL: https://build.opensuse.org/request/show/886367
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm12?expand=0&rev=1
2021-04-19 06:47:05 +00:00

59 lines
1.4 KiB
Diff

diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt
index ceef4b08637..606149ad74f 100644
--- a/clang/tools/c-index-test/CMakeLists.txt
+++ b/clang/tools/c-index-test/CMakeLists.txt
@@ -18,6 +18,9 @@ if (LLVM_BUILD_STATIC)
target_link_libraries(c-index-test
PRIVATE
libclang_static
+ )
+ clang_target_link_libraries(c-index-test
+ PRIVATE
clangCodeGen
clangIndex
)
@@ -25,6 +28,9 @@ else()
target_link_libraries(c-index-test
PRIVATE
libclang
+ )
+ clang_target_link_libraries(c-index-test
+ PRIVATE
clangAST
clangBasic
clangCodeGen
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
index 613ead1a36b..f86be77b8e7 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -33,7 +33,7 @@ set(SOURCES
../../include/clang-c/Index.h
)
-set(LIBS
+set(CLANG_LIB_DEPS
clangAST
clangBasic
clangDriver
@@ -46,7 +46,7 @@ set(LIBS
)
if (CLANG_ENABLE_ARCMT)
- list(APPEND LIBS clangARCMigrate)
+ list(APPEND CLANG_LIB_DEPS clangARCMigrate)
endif ()
option(LIBCLANG_INCLUDE_CLANG_TOOLS_EXTRA
@@ -108,6 +108,11 @@ add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} INSTALL_WITH_TOOLCH
Support
)
+clang_target_link_libraries(libclang
+ PRIVATE
+ ${CLANG_LIB_DEPS}
+ )
+
if(ENABLE_STATIC)
foreach(name libclang obj.libclang libclang_static)
if (TARGET ${name})