summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-22 23:14:44 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-22 23:14:44 +0000
commit9362cdc48197b924615b131603b3c5e92493f233 (patch)
treed9ccd32576221e690fc31da0ebe108c88056f56e /build
parentb36a7bdca1c1ebc66e9b401296c90d1f69ae686c (diff)
downloadchromium_src-9362cdc48197b924615b131603b3c5e92493f233.zip
chromium_src-9362cdc48197b924615b131603b3c5e92493f233.tar.gz
chromium_src-9362cdc48197b924615b131603b3c5e92493f233.tar.bz2
Cross compiling: don't rewrite dirs if they're already prefixed.
When compiling with the new portage build system for Chromium OS, paths passed in for includes, libraries, etc., are already properly prefixed with the sysroot and do not need to be again prefixed with the sysroot. Review URL: http://codereview.chromium.org/652067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39655 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/linux/rewrite_dirs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/linux/rewrite_dirs.py b/build/linux/rewrite_dirs.py
index bb37b24..5c41cf9 100755
--- a/build/linux/rewrite_dirs.py
+++ b/build/linux/rewrite_dirs.py
@@ -20,7 +20,7 @@ REWRITE_PREFIX = ['-I',
def RewritePath(path, sysroot):
"""Rewrites a path by prefixing it with the sysroot if it is absolute."""
- if os.path.isabs(path):
+ if os.path.isabs(path) and not path.startswith(sysroot):
path = path.lstrip('/')
return os.path.join(sysroot, path)
else: