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

Commit 1072537

Browse files
kjellanderRaphael Kubo da Costa
kjellander
authored and
Raphael Kubo da Costa
committed
[Backport] Remove assumption on absolute paths in java_cpp_enum.py.
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
1 parent b079fa0 commit 1072537

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: build/android/gyp/java_cpp_enum.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,7 @@ def _ParseRegularLine(self, line):
229229
self._in_enum = True
230230

231231
def GetScriptName():
232-
script_components = os.path.abspath(sys.argv[0]).split(os.path.sep)
233-
build_index = script_components.index('build')
234-
return os.sep.join(script_components[build_index:])
235-
232+
return os.path.basename(os.path.abspath(sys.argv[0]))
236233

237234
def DoGenerate(source_paths):
238235
for source_path in source_paths:

0 commit comments

Comments
 (0)