summaryrefslogtreecommitdiff
path: root/pylib/gyp/mac_tool.py
diff options
context:
space:
mode:
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."""