Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix GYP settings to avoid rebuilding already built files #37429

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
199 changes: 193 additions & 6 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,198 @@
'v8_os_page_size%': 0,
'generate_bytecode_output_root': '<(SHARED_INTERMEDIATE_DIR)/generate-bytecode-output-root',
'generate_bytecode_builtins_list_output': '<(generate_bytecode_output_root)/builtins-generated/bytecodes-builtins-list.h',
'torque_files': ['<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "torque_files = ")'],
'torque_files': [
targos marked this conversation as resolved.
Show resolved Hide resolved
"<(V8_ROOT)/src/builtins/aggregate-error.tq",
"<(V8_ROOT)/src/builtins/array-copywithin.tq",
"<(V8_ROOT)/src/builtins/array-every.tq",
"<(V8_ROOT)/src/builtins/array-filter.tq",
"<(V8_ROOT)/src/builtins/array-find.tq",
"<(V8_ROOT)/src/builtins/array-findindex.tq",
"<(V8_ROOT)/src/builtins/array-foreach.tq",
"<(V8_ROOT)/src/builtins/array-from.tq",
"<(V8_ROOT)/src/builtins/array-isarray.tq",
"<(V8_ROOT)/src/builtins/array-join.tq",
"<(V8_ROOT)/src/builtins/array-lastindexof.tq",
"<(V8_ROOT)/src/builtins/array-map.tq",
"<(V8_ROOT)/src/builtins/array-of.tq",
"<(V8_ROOT)/src/builtins/array-reduce-right.tq",
"<(V8_ROOT)/src/builtins/array-reduce.tq",
"<(V8_ROOT)/src/builtins/array-reverse.tq",
"<(V8_ROOT)/src/builtins/array-shift.tq",
"<(V8_ROOT)/src/builtins/array-slice.tq",
"<(V8_ROOT)/src/builtins/array-some.tq",
"<(V8_ROOT)/src/builtins/array-splice.tq",
"<(V8_ROOT)/src/builtins/array-unshift.tq",
"<(V8_ROOT)/src/builtins/array.tq",
"<(V8_ROOT)/src/builtins/arraybuffer.tq",
"<(V8_ROOT)/src/builtins/base.tq",
"<(V8_ROOT)/src/builtins/boolean.tq",
"<(V8_ROOT)/src/builtins/builtins-bigint.tq",
"<(V8_ROOT)/src/builtins/builtins-string.tq",
"<(V8_ROOT)/src/builtins/cast.tq",
"<(V8_ROOT)/src/builtins/collections.tq",
"<(V8_ROOT)/src/builtins/console.tq",
"<(V8_ROOT)/src/builtins/constructor.tq",
"<(V8_ROOT)/src/builtins/conversion.tq",
"<(V8_ROOT)/src/builtins/convert.tq",
"<(V8_ROOT)/src/builtins/data-view.tq",
"<(V8_ROOT)/src/builtins/finalization-registry.tq",
"<(V8_ROOT)/src/builtins/frame-arguments.tq",
"<(V8_ROOT)/src/builtins/frames.tq",
"<(V8_ROOT)/src/builtins/function.tq",
"<(V8_ROOT)/src/builtins/growable-fixed-array.tq",
"<(V8_ROOT)/src/builtins/ic-callable.tq",
"<(V8_ROOT)/src/builtins/ic-dynamic-map-checks.tq",
"<(V8_ROOT)/src/builtins/ic.tq",
"<(V8_ROOT)/src/builtins/internal-coverage.tq",
"<(V8_ROOT)/src/builtins/internal.tq",
"<(V8_ROOT)/src/builtins/iterator.tq",
"<(V8_ROOT)/src/builtins/math.tq",
"<(V8_ROOT)/src/builtins/number.tq",
"<(V8_ROOT)/src/builtins/object-fromentries.tq",
"<(V8_ROOT)/src/builtins/object.tq",
"<(V8_ROOT)/src/builtins/promise-abstract-operations.tq",
"<(V8_ROOT)/src/builtins/promise-all-element-closure.tq",
"<(V8_ROOT)/src/builtins/promise-all.tq",
"<(V8_ROOT)/src/builtins/promise-any.tq",
"<(V8_ROOT)/src/builtins/promise-constructor.tq",
"<(V8_ROOT)/src/builtins/promise-finally.tq",
"<(V8_ROOT)/src/builtins/promise-jobs.tq",
"<(V8_ROOT)/src/builtins/promise-misc.tq",
"<(V8_ROOT)/src/builtins/promise-race.tq",
"<(V8_ROOT)/src/builtins/promise-reaction-job.tq",
"<(V8_ROOT)/src/builtins/promise-resolve.tq",
"<(V8_ROOT)/src/builtins/promise-then.tq",
"<(V8_ROOT)/src/builtins/proxy-constructor.tq",
"<(V8_ROOT)/src/builtins/proxy-delete-property.tq",
"<(V8_ROOT)/src/builtins/proxy-get-property.tq",
"<(V8_ROOT)/src/builtins/proxy-get-prototype-of.tq",
"<(V8_ROOT)/src/builtins/proxy-has-property.tq",
"<(V8_ROOT)/src/builtins/proxy-is-extensible.tq",
"<(V8_ROOT)/src/builtins/proxy-prevent-extensions.tq",
"<(V8_ROOT)/src/builtins/proxy-revocable.tq",
"<(V8_ROOT)/src/builtins/proxy-revoke.tq",
"<(V8_ROOT)/src/builtins/proxy-set-property.tq",
"<(V8_ROOT)/src/builtins/proxy-set-prototype-of.tq",
"<(V8_ROOT)/src/builtins/proxy.tq",
"<(V8_ROOT)/src/builtins/reflect.tq",
"<(V8_ROOT)/src/builtins/regexp-exec.tq",
"<(V8_ROOT)/src/builtins/regexp-match-all.tq",
"<(V8_ROOT)/src/builtins/regexp-match.tq",
"<(V8_ROOT)/src/builtins/regexp-replace.tq",
"<(V8_ROOT)/src/builtins/regexp-search.tq",
"<(V8_ROOT)/src/builtins/regexp-source.tq",
"<(V8_ROOT)/src/builtins/regexp-split.tq",
"<(V8_ROOT)/src/builtins/regexp-test.tq",
"<(V8_ROOT)/src/builtins/regexp.tq",
"<(V8_ROOT)/src/builtins/string-endswith.tq",
"<(V8_ROOT)/src/builtins/string-html.tq",
"<(V8_ROOT)/src/builtins/string-iterator.tq",
"<(V8_ROOT)/src/builtins/string-pad.tq",
"<(V8_ROOT)/src/builtins/string-repeat.tq",
"<(V8_ROOT)/src/builtins/string-replaceall.tq",
"<(V8_ROOT)/src/builtins/string-slice.tq",
"<(V8_ROOT)/src/builtins/string-startswith.tq",
"<(V8_ROOT)/src/builtins/string-substr.tq",
"<(V8_ROOT)/src/builtins/string-substring.tq",
"<(V8_ROOT)/src/builtins/string-trim.tq",
"<(V8_ROOT)/src/builtins/symbol.tq",
"<(V8_ROOT)/src/builtins/torque-internal.tq",
"<(V8_ROOT)/src/builtins/typed-array-createtypedarray.tq",
"<(V8_ROOT)/src/builtins/typed-array-entries.tq",
"<(V8_ROOT)/src/builtins/typed-array-every.tq",
"<(V8_ROOT)/src/builtins/typed-array-filter.tq",
"<(V8_ROOT)/src/builtins/typed-array-find.tq",
"<(V8_ROOT)/src/builtins/typed-array-findindex.tq",
"<(V8_ROOT)/src/builtins/typed-array-foreach.tq",
"<(V8_ROOT)/src/builtins/typed-array-from.tq",
"<(V8_ROOT)/src/builtins/typed-array-keys.tq",
"<(V8_ROOT)/src/builtins/typed-array-of.tq",
"<(V8_ROOT)/src/builtins/typed-array-reduce.tq",
"<(V8_ROOT)/src/builtins/typed-array-reduceright.tq",
"<(V8_ROOT)/src/builtins/typed-array-set.tq",
"<(V8_ROOT)/src/builtins/typed-array-slice.tq",
"<(V8_ROOT)/src/builtins/typed-array-some.tq",
"<(V8_ROOT)/src/builtins/typed-array-sort.tq",
"<(V8_ROOT)/src/builtins/typed-array-subarray.tq",
"<(V8_ROOT)/src/builtins/typed-array-values.tq",
"<(V8_ROOT)/src/builtins/typed-array.tq",
"<(V8_ROOT)/src/builtins/wasm.tq",
"<(V8_ROOT)/src/builtins/weak-ref.tq",
"<(V8_ROOT)/src/ic/handler-configuration.tq",
"<(V8_ROOT)/src/objects/allocation-site.tq",
"<(V8_ROOT)/src/objects/api-callbacks.tq",
"<(V8_ROOT)/src/objects/arguments.tq",
"<(V8_ROOT)/src/objects/bigint.tq",
"<(V8_ROOT)/src/objects/cell.tq",
"<(V8_ROOT)/src/objects/code.tq",
"<(V8_ROOT)/src/objects/contexts.tq",
"<(V8_ROOT)/src/objects/data-handler.tq",
"<(V8_ROOT)/src/objects/debug-objects.tq",
"<(V8_ROOT)/src/objects/descriptor-array.tq",
"<(V8_ROOT)/src/objects/embedder-data-array.tq",
"<(V8_ROOT)/src/objects/feedback-cell.tq",
"<(V8_ROOT)/src/objects/feedback-vector.tq",
"<(V8_ROOT)/src/objects/fixed-array.tq",
"<(V8_ROOT)/src/objects/foreign.tq",
"<(V8_ROOT)/src/objects/free-space.tq",
"<(V8_ROOT)/src/objects/heap-number.tq",
"<(V8_ROOT)/src/objects/heap-object.tq",
"<(V8_ROOT)/src/objects/js-array-buffer.tq",
"<(V8_ROOT)/src/objects/js-array.tq",
"<(V8_ROOT)/src/objects/js-break-iterator.tq",
"<(V8_ROOT)/src/objects/js-collator.tq",
"<(V8_ROOT)/src/objects/js-collection-iterator.tq",
"<(V8_ROOT)/src/objects/js-collection.tq",
"<(V8_ROOT)/src/objects/js-date-time-format.tq",
"<(V8_ROOT)/src/objects/js-display-names.tq",
"<(V8_ROOT)/src/objects/js-function.tq",
"<(V8_ROOT)/src/objects/js-generator.tq",
"<(V8_ROOT)/src/objects/js-list-format.tq",
"<(V8_ROOT)/src/objects/js-locale.tq",
"<(V8_ROOT)/src/objects/js-number-format.tq",
"<(V8_ROOT)/src/objects/js-objects.tq",
"<(V8_ROOT)/src/objects/js-plural-rules.tq",
"<(V8_ROOT)/src/objects/js-promise.tq",
"<(V8_ROOT)/src/objects/js-proxy.tq",
"<(V8_ROOT)/src/objects/js-regexp-string-iterator.tq",
"<(V8_ROOT)/src/objects/js-regexp.tq",
"<(V8_ROOT)/src/objects/js-relative-time-format.tq",
"<(V8_ROOT)/src/objects/js-segment-iterator.tq",
"<(V8_ROOT)/src/objects/js-segmenter.tq",
"<(V8_ROOT)/src/objects/js-segments.tq",
"<(V8_ROOT)/src/objects/js-weak-refs.tq",
"<(V8_ROOT)/src/objects/literal-objects.tq",
"<(V8_ROOT)/src/objects/map.tq",
"<(V8_ROOT)/src/objects/microtask.tq",
"<(V8_ROOT)/src/objects/module.tq",
"<(V8_ROOT)/src/objects/name.tq",
"<(V8_ROOT)/src/objects/oddball.tq",
"<(V8_ROOT)/src/objects/ordered-hash-table.tq",
"<(V8_ROOT)/src/objects/primitive-heap-object.tq",
"<(V8_ROOT)/src/objects/promise.tq",
"<(V8_ROOT)/src/objects/property-array.tq",
"<(V8_ROOT)/src/objects/property-cell.tq",
"<(V8_ROOT)/src/objects/property-descriptor-object.tq",
"<(V8_ROOT)/src/objects/prototype-info.tq",
"<(V8_ROOT)/src/objects/regexp-match-info.tq",
"<(V8_ROOT)/src/objects/scope-info.tq",
"<(V8_ROOT)/src/objects/script.tq",
"<(V8_ROOT)/src/objects/shared-function-info.tq",
"<(V8_ROOT)/src/objects/source-text-module.tq",
"<(V8_ROOT)/src/objects/stack-frame-info.tq",
"<(V8_ROOT)/src/objects/string.tq",
"<(V8_ROOT)/src/objects/struct.tq",
"<(V8_ROOT)/src/objects/synthetic-module.tq",
"<(V8_ROOT)/src/objects/template-objects.tq",
"<(V8_ROOT)/src/objects/templates.tq",
"<(V8_ROOT)/src/objects/torque-defined-classes.tq",
"<(V8_ROOT)/src/wasm/wasm-objects.tq",
"<(V8_ROOT)/test/torque/test-torque.tq",
"<(V8_ROOT)/third_party/v8/builtins/array-sort.tq",
],
# Torque and V8 expect the files to be named relative to V8's root.
'torque_files_without_v8_root': ['<!@pymod_do_main(ForEachReplace "<@(V8_ROOT)/" "" <@(torque_files))'],
'torque_files_replaced': ['<!@pymod_do_main(ForEachReplace ".tq" "-tq" <@(torque_files_without_v8_root))'],
'torque_files_replaced': ['<!@pymod_do_main(ForEachReplace ".tq" "-tq" <@(torque_files))'],
'torque_outputs_csa_cc': ['<!@pymod_do_main(ForEachFormat "<(SHARED_INTERMEDIATE_DIR)/torque-generated/%s-csa.cc" <@(torque_files_replaced))'],
'torque_outputs_csa_h': ['<!@pymod_do_main(ForEachFormat "<(SHARED_INTERMEDIATE_DIR)/torque-generated/%s-csa.h" <@(torque_files_replaced))'],
'torque_outputs_inl_inc': ['<!@pymod_do_main(ForEachFormat "<(SHARED_INTERMEDIATE_DIR)/torque-generated/%s-inl.inc" <@(torque_files_replaced))'],
Expand All @@ -25,7 +213,7 @@
'conditions': [
['v8_enable_i18n_support', {
'torque_files': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "torque_files \\+= ")',
"<(V8_ROOT)/src/objects/intl-objects.tq",
],
}],
],
Expand Down Expand Up @@ -91,8 +279,7 @@
'<@(torque_outputs_inc)',
],
'action': [
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)',
'<@(torque_files_without_v8_root)',
'<@(_inputs)',
'-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated',
'-v8-root', '<(V8_ROOT)'
],
Expand Down