CMakeParseImplicitLinkInfo: Exclude libclang_rt libraries

These libraries are used for Clang runtime analysis support with
flags like `-fsanitize=memory` and are not actually implicitly
linked libraries.

Fixes #16194.
This commit is contained in:
Brad King
2016-07-11 16:28:24 -04:00
parent 507aa256e5
commit 353222262a
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
# We remove items that are not language-specific.
set(implicit_libs "")
foreach(lib IN LISTS implicit_libs_tmp)
if("x${lib}" MATCHES "^x(crt.*\\.o|gcc.*|System.*)$")
if("x${lib}" MATCHES "^x(crt.*\\.o|gcc.*|System.*|.*libclang_rt.*)$")
set(log "${log} remove lib [${lib}]\n")
elseif(IS_ABSOLUTE "${lib}")
get_filename_component(abs "${lib}" ABSOLUTE)