v8/bazel
Jakob Linke 539b50f5ae [turbofan] Add the v8_enable_turbofan build option
When disabled, Turbofan is fully excluded from the compilation result.
This is expected to reduce V8's contribution to chromium's binary size
by roughly 20%.

If Turbofan is disabled, Maglev and Webassembly must also be disabled
(since both depend on TF).

Note this new configuration (v8_enable_turbofan=false) is not yet
used anywhere - we'll probably enable it for lite_mode bots in an
upcoming CL for test coverage.

Changes in detail:
- Split out all src/compiler files from the main source sets. This
  was mostly done already, here we only clean up the few files that
  were left.
- Define a new main TF entry point in turbofan.h. `NewCompilationJob`
  replaces `Pipeline::NewCompilationJob`.
- When TF is enabled, turbofan-enabled.cc implements the above.
- When disabled, turbofan-disabled stubs out the above with a runtime
  FATAL message.
- The build process is modified s.t. mksnapshot always has TF
  available since it's needed to generate builtins. When disabled,
  TF is removed from other components, in particular it is no longer
  included in v8_compiler and transitively in v8_base.
- When disabled, v8_for_testing no longer has v8_initializers
  available. These were only needed for test-serialize.cc, which
  is now excluded from this build mode.
- When disabled, remove all related cctest/ und unittest/ files from
  the build.

Bug: v8:13629
Change-Id: I63ab7632f03d0ee4a787cfc01574b5fdb08fd80b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128529
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85210}
2023-01-11 10:57:54 +00:00
..
config [bazel] Add hide symbols from release build 2022-11-22 10:00:46 +00:00
BUILD.icu [bazel] Cleanup style with Buildifier. 2022-01-11 10:00:36 +00:00
BUILD.trace_event_common [bazel] Don't use source files from external dependencies. 2022-01-10 20:08:45 +00:00
defs.bzl [turbofan] Add the v8_enable_turbofan build option 2023-01-11 10:57:54 +00:00
OWNERS Update OWNERS files 2022-02-16 08:16:04 +00:00
requirements.in [bazel] Generate inspector files using @rules_python. 2022-01-10 13:32:28 +00:00
requirements.txt [bazel] Generate inspector files using @rules_python. 2022-01-10 13:32:28 +00:00
v8-non-pointer-compression.bzl [bazel] Fix v8_binary_non_pointer_compression. 2021-12-15 18:28:35 +00:00