From fa66a340eb750bc72a813d92d6c6898c091c07cb Mon Sep 17 00:00:00 2001 From: Oleg Ranevskyy Date: Thu, 10 Aug 2017 13:37:58 +0000 Subject: [PATCH] [CMake][LLVM] Remove duplicated library mask. Broken clang linking against clangShared Summary: The `LLVM${c}Info` mask is listed twice in LLVM-Config.cmake. This results in the libraries such as LLVMARMInfo, LLVMAArch4Info, etc appearing twice in `extract_symbols.py` command line while building `clangShared`. `Extract_symbols.py` does not work well in such a case and completely ignores the symbols from the duplicated libraries. Thus, the LLVM(...)Info symbols do not get exported from `clangShared` and linking clang against it fails with unresolved dependencies. Seems to be a mere copy-paste mistake. Reviewers: beanz, chapuni Reviewed By: chapuni Subscribers: chapuni, aemerson, mgorny, kristof.beyls, llvm-commits, asl Differential Revision: https://reviews.llvm.org/D36119 llvm-svn: 310590 --- llvm/cmake/modules/LLVM-Config.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake index 52330151065b6..2b9ab23c47704 100644 --- a/llvm/cmake/modules/LLVM-Config.cmake +++ b/llvm/cmake/modules/LLVM-Config.cmake @@ -175,18 +175,15 @@ function(llvm_map_components_to_libnames out_libs) message(FATAL_ERROR "Target ${c} is not in the set of libraries.") endif() endif() - if( TARGET LLVM${c}AsmPrinter ) - list(APPEND expanded_components "LLVM${c}AsmPrinter") - endif() if( TARGET LLVM${c}AsmParser ) list(APPEND expanded_components "LLVM${c}AsmParser") endif() + if( TARGET LLVM${c}AsmPrinter ) + list(APPEND expanded_components "LLVM${c}AsmPrinter") + endif() if( TARGET LLVM${c}Desc ) list(APPEND expanded_components "LLVM${c}Desc") endif() - if( TARGET LLVM${c}Info ) - list(APPEND expanded_components "LLVM${c}Info") - endif() if( TARGET LLVM${c}Disassembler ) list(APPEND expanded_components "LLVM${c}Disassembler") endif()