summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deps/v8/gypfiles/ForEachFormat.py5
-rw-r--r--deps/v8/gypfiles/v8.gyp67
-rw-r--r--tools/gyp/pylib/gyp/input.py2
3 files changed, 9 insertions, 65 deletions
diff --git a/deps/v8/gypfiles/ForEachFormat.py b/deps/v8/gypfiles/ForEachFormat.py
new file mode 100644
index 0000000000..3015cb8b82
--- /dev/null
+++ b/deps/v8/gypfiles/ForEachFormat.py
@@ -0,0 +1,5 @@
+# Copyright (c) 2019 Refael Ackeramnn<refack@gmail.com>. All rights reserved.
+# Use of this source code is governed by an MIT-style license.
+def DoMain(args):
+ format_str = args.pop(0)
+ return ' '.join(format_str % a for a in args)
diff --git a/deps/v8/gypfiles/v8.gyp b/deps/v8/gypfiles/v8.gyp
index ba3ba8ddae..48b1e2ac62 100644
--- a/deps/v8/gypfiles/v8.gyp
+++ b/deps/v8/gypfiles/v8.gyp
@@ -92,71 +92,8 @@
# "$target_gen_dir/torque-generated/builtins-$namespace-from-dsl-gen.h",
# ]
# }
- 'torque_output_root': '<(SHARED_INTERMEDIATE_DIR)/torque-output-root',
- 'torque_outputs': [
- '<(torque_output_root)/torque-generated/builtins-arguments-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-arguments-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-copywithin-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-copywithin-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-filter-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-filter-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-find-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-find-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-findindex-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-findindex-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-foreach-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-foreach-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-join-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-join-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-map-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-map-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-of-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-of-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-reverse-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-reverse-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-slice-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-slice-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-splice-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-splice-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-unshift-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-unshift-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-array-lastindexof-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-array-lastindexof-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-base-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-base-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-collections-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-collections-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-data-view-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-data-view-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-extras-utils-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-extras-utils-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-growable-fixed-array-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-growable-fixed-array-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-iterator-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-iterator-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-object-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-object-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-string-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-string-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-createtypedarray-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-createtypedarray-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-filter-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-filter-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-foreach-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-foreach-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-reduce-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-reduce-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-reduceright-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-reduceright-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-slice-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-slice-from-dsl-gen.h',
- '<(torque_output_root)/torque-generated/builtins-typed-array-subarray-from-dsl-gen.cc',
- '<(torque_output_root)/torque-generated/builtins-typed-array-subarray-from-dsl-gen.h',
- ],
+ 'torque_outputs': [ '<!@pymod_do_main(ForEachFormat "<(torque_output_root)/torque-generated/builtins-%s-from-dsl-gen.cc" <@(torque_namespaces))' ],
+ 'torque_outputs+': [ '<!@pymod_do_main(ForEachFormat "<(torque_output_root)/torque-generated/builtins-%s-from-dsl-gen.h" <@(torque_namespaces))' ],
'torque_generated_pure_headers': [
'<(torque_output_root)/torque-generated/builtin-definitions-from-dsl.h',
'<(torque_output_root)/torque-generated/class-definitions-from-dsl.h',
diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py
index a046a15cc1..cdf33fd946 100644
--- a/tools/gyp/pylib/gyp/input.py
+++ b/tools/gyp/pylib/gyp/input.py
@@ -881,6 +881,7 @@ def ExpandVariables(input, phase, variables, build_file):
oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.
if build_file_dir: # build_file_dir may be None (see above).
os.chdir(build_file_dir)
+ sys.path.append(os.getcwd())
try:
parsed_contents = shlex.split(contents)
@@ -891,6 +892,7 @@ def ExpandVariables(input, phase, variables, build_file):
"module (%s): %s" % (parsed_contents[0], e))
replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
finally:
+ sys.path.pop()
os.chdir(oldwd)
assert replacement != None
elif command_string: