Skip to content

Commit

Permalink
Apply local patches when building llvm on Mac.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sas committed Jul 12, 2016
1 parent fc7e6a0 commit de76548
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lldb/scripts/Xcode/build-llvm.py
Expand Up @@ -2,6 +2,7 @@

import errno
import hashlib
import fnmatch
import os
import platform
import subprocess
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit de76548

Please sign in to comment.