[Lldb-commits] [lldb] r275134 - Apply local patches when building llvm on Mac.
Stephane Sezer via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 11 18:28:59 PDT 2016
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())
More information about the lldb-commits
mailing list