summaryrefslogtreecommitdiff
path: root/pylib/gyp/mac_tool.py
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2012-02-10 00:17:47 +0000
committerthakis@chromium.org <thakis@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2012-02-10 00:17:47 +0000
commit044fbe1c263aef9b29e85fefca1672d530717fa7 (patch)
tree7df8765b56d5b5e6447f623b6590706b2015fc9f /pylib/gyp/mac_tool.py
parentd197d57c5cc7d3271acd24a0af4618ea3d03189a (diff)
downloadgyp-044fbe1c263aef9b29e85fefca1672d530717fa7.tar.gz
ninja/mac, make/mac: Strip useless libtool output.
Review URL: https://chromiumcodereview.appspot.com/9370035 git-svn-id: http://gyp.googlecode.com/svn/trunk@1194 78cadc50-ecff-11dd-a971-7dbc132099af
Diffstat (limited to 'pylib/gyp/mac_tool.py')
-rwxr-xr-xpylib/gyp/mac_tool.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/pylib/gyp/mac_tool.py b/pylib/gyp/mac_tool.py
index 5ba157af..d5f8ed28 100755
--- a/pylib/gyp/mac_tool.py
+++ b/pylib/gyp/mac_tool.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -8,9 +8,10 @@
These functions are executed via gyp-mac-tool when using the Makefile generator.
"""
-import os
import fcntl
+import os
import plistlib
+import re
import shutil
import string
import subprocess
@@ -151,6 +152,15 @@ class MacTool(object):
fcntl.flock(fd, fcntl.LOCK_EX)
return subprocess.call(cmd_list)
+ def ExecFilterLibtool(self, *cmd_list):
+ """Calls libtool and filters out 'libtool: file: foo.o has no symbols'."""
+ libtool_re = re.compile(r'^libtool: file: .* has no symbols$')
+ libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE)
+ for line in libtoolout.stderr:
+ if not libtool_re.match(line):
+ print >> sys.stderr, line
+ return libtoolout.returncode
+
def ExecPackageFramework(self, framework, version):
"""Takes a path to Something.framework and the Current version of that and
sets up all the symlinks."""