The Xcode macOS build of LLDB is currently broken after
https://reviews.llvm.org/D23232 landed, see
http://lab.llvm.org:8080/green/job/lldb_build_test/20014/console,
because we’re trying to link against all .a files found in the
llvm-build/lib directory. Let’s be more specific in what we link
against. This patch applies a regexp to only use “libclang.*”,
“libLLVM.*” and not “libclang_rt.*” static archives.
Change by Kuba Mracek (formerly Kuba Brecka)
See review here:
https://reviews.llvm.org/D23444
Reviewers: tfiala, compnerd
llvm-svn: 278527
import fnmatch
import os
import platform
+import re
import subprocess
import sys
def collect_archives_in_path (path):
files = os.listdir(path)
- return [os.path.join(path, file) for file in files if file.endswith(".a")]
+ # Only use libclang and libLLVM archives, and exclude libclang_rt
+ regexp = "^lib(clang[^_]|LLVM).*$"
+ return [os.path.join(path, file) for file in files if file.endswith(".a") and re.match(regexp, file)]
def archive_list ():
paths = library_paths()