Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Backport] Remove assumption on absolute paths in java_cpp_enum.py.
Browse files Browse the repository at this point in the history
The same issue in libyuv also affects us. Original commit message:

  In java_cpp_enum.py there were assumptions on 'build' being
  a component of the absolute path of the script invoking the
  script. This leads to problems when other projects are using
  the Chromium build toolchain (in this case libyuv), where
  the script invoking GYP is located in the root of the project
  dir (https://chromium.googlesource.com/libyuv/libyuv/+/master/gyp_libyuv).

  BUG=libyuv:536

  Review URL: https://codereview.chromium.org/1571243003

BUG=XWALK-5749
  • Loading branch information
kjellander authored and Olli Raula committed Feb 4, 2016
1 parent df74102 commit 2afaca7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions build/android/gyp/java_cpp_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,7 @@ def _ParseRegularLine(self, line):
self._in_enum = True

def GetScriptName():
script_components = os.path.abspath(sys.argv[0]).split(os.path.sep)
build_index = script_components.index('build')
return os.sep.join(script_components[build_index:])

return os.path.basename(os.path.abspath(sys.argv[0]))

def DoGenerate(source_paths):
for source_path in source_paths:
Expand Down

0 comments on commit 2afaca7

Please sign in to comment.