Skip to content
Permalink
Browse files

deps,build: compute torque_outputs in v8.gyp

PR-URL: #26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information...
refack committed Mar 23, 2019
1 parent 4507246 commit fff922afee6e564dfe7849d88da9abe070974f43
Showing with 9 additions and 65 deletions.
  1. +5 −0 deps/v8/gypfiles/ForEachFormat.py
  2. +2 −65 deps/v8/gypfiles/v8.gyp
  3. +2 −0 tools/gyp/pylib/gyp/input.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)
@@ -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',
@@ -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:

0 comments on commit fff922a

Please sign in to comment.
You can’t perform that action at this time.