Author: sas
Date: Mon Jul 11 20:28:59 2016
New Revision: 275134

URL: http://llvm.org/viewvc/llvm-project?rev=275134&view=rev
Log:
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

Modified:
    lldb/trunk/scripts/Xcode/build-llvm.py

Modified: lldb/trunk/scripts/Xcode/build-llvm.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/build-llvm.py?rev=275134&r1=275133&r2=275134&view=diff
==============================================================================
--- lldb/trunk/scripts/Xcode/build-llvm.py (original)
+++ lldb/trunk/scripts/Xcode/build-llvm.py Mon Jul 11 20:28:59 2016
@@ -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())


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to