summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Xcode/build-llvm.py
diff options
context:
space:
mode:
authorStephane Sezer <sas@cd80.net>2016-07-12 01:28:59 +0000
committerStephane Sezer <sas@cd80.net>2016-07-12 01:28:59 +0000
commitde76548f9aa6bd92e0552979fd55f533031282ed (patch)
treebb636d97156d68794664d8b04e21c47064f14eb0 /lldb/scripts/Xcode/build-llvm.py
parentfc7e6a0a0ef5ba19c35026f6aac1907bce770e90 (diff)
downloadbcm5719-llvm-de76548f9aa6bd92e0552979fd55f533031282ed.tar.gz
bcm5719-llvm-de76548f9aa6bd92e0552979fd55f533031282ed.zip
Apply local patches when building llvm on Mac.
Summary: This is already done when building for linux with the CMake build system. This functionality disappeared recently when some of the build scripts used by the xcode build system changed. Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22233 llvm-svn: 275134
Diffstat (limited to 'lldb/scripts/Xcode/build-llvm.py')
-rwxr-xr-xlldb/scripts/Xcode/build-llvm.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/scripts/Xcode/build-llvm.py b/lldb/scripts/Xcode/build-llvm.py
index 4e2a67a589c..7f330e0d4ea 100755
--- a/lldb/scripts/Xcode/build-llvm.py
+++ b/lldb/scripts/Xcode/build-llvm.py
@@ -2,6 +2,7 @@
import errno
import hashlib
+import fnmatch
import os
import platform
import subprocess
@@ -166,9 +167,16 @@ def all_source_control_status_md5 ():
#### CHECKING OUT AND BUILDING LLVM ####
+def apply_patches(spec):
+ files = os.listdir(os.path.join(lldb_source_path(), 'scripts'))
+ patches = [f for f in files if fnmatch.fnmatch(f, spec['name'] + '.*.diff')]
+ for p in patches:
+ run_in_directory(["patch", "-p0", "-i", os.path.join(lldb_source_path(), 'scripts', p)], spec['root'])
+
def check_out_if_needed(spec):
if not os.path.isdir(spec['root']):
vcs(spec).check_out()
+ apply_patches(spec)
def all_check_out_if_needed ():
map (check_out_if_needed, XCODE_REPOSITORIES())
OpenPOWER on IntegriCloud