This revision was automatically updated to reflect the committed changes. Closed by commit rL275134: Apply local patches when building llvm on Mac. (authored by sas).
Changed prior to commit: http://reviews.llvm.org/D22233?vs=63547&id=63619#toc Repository: rL LLVM http://reviews.llvm.org/D22233 Files: lldb/trunk/scripts/Xcode/build-llvm.py Index: lldb/trunk/scripts/Xcode/build-llvm.py =================================================================== --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/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 @@ #### 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())
Index: lldb/trunk/scripts/Xcode/build-llvm.py =================================================================== --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/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 @@ #### 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