Chromium Code Reviews| Index: ios/build/packaging/link_dependencies.py |
| diff --git a/ios/build/packaging/link_dependencies.py b/ios/build/packaging/link_dependencies.py |
| index df541a63758a734f7fce000adb9a8ad7e4058369..be3f119ef2ae6f4c673fe1195bee5b5b894e8d49 100755 |
| --- a/ios/build/packaging/link_dependencies.py |
| +++ b/ios/build/packaging/link_dependencies.py |
| @@ -16,7 +16,9 @@ static library that should be produced. For example: |
| import argparse |
| import os |
| +import re |
| import subprocess |
| +import sys |
| class SubprocessError(Exception): |
| @@ -126,8 +128,14 @@ def link(output, inputs): |
| output: file system path to desired output library |
| inputs: list of file system paths to input libraries |
| """ |
| - p = subprocess.Popen(['libtool', '-o', output] + inputs) |
| - p.communicate() |
| + libtool_re = re.compile(r'^.*libtool: (?:for architecture: \S* )?' |
| + r'file: .* has no symbols$') |
| + p = subprocess.Popen( |
| + ['libtool', '-o', output] + inputs, stderr=subprocess.PIPE) |
| + _, err = p.communicate() |
| + for line in err.splitlines(): |
| + if not libtool_re.match(line) and not libtool_re5.match(line): |
|
droger
2016/02/05 09:08:50
Where is libtool_re5 defined? Do we need to import
sdefresne
2016/02/05 09:58:56
Ooops. Removed.
|
| + print >>sys.stderr, line |
|
droger
2016/02/05 09:08:50
Missing whitespace after >>
sdefresne
2016/02/05 09:58:56
No, this is the syntax to write to a file using pr
|
| if p.returncode != 0: |
| message = "subprocess libtool returned {0}".format(p.returncode) |
| raise SubprocessError(message) |