summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Xcode/build-llvm.py
diff options
context:
space:
mode:
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