Skip to content

Commit

Permalink
Always route builds through jumbo.gni for simpler code
Browse files Browse the repository at this point in the history
jumbo.gni will check whether use_jumbo_build is set or not and
if it's not set it will just check that |jumbo_excluded_sources|
lists do not include non-existing files. That means that there
is little/nothing to lose by always routing v8_source_set that
way, and it adds a bit in build file simplicity and local
checking of |jumbo_excluded_sources|.

Change-Id: I19ed91d304f4a2edbf10661d20e5f5d3180b3a35
Reviewed-on: https://chromium-review.googlesource.com/c/1430832
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59169}
  • Loading branch information
bratell-at-opera authored and Commit Bot committed Jan 29, 2019
1 parent 185922d commit c566a40
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 49 deletions.
72 changes: 30 additions & 42 deletions BUILD.gn
Expand Up @@ -1256,23 +1256,17 @@ if (v8_use_snapshot && v8_use_external_startup_data) {
if (v8_use_multi_snapshots) {
deps += [ ":asm_to_inline_asm_trusted" ]
sources += [ "$target_gen_dir/embedded_trusted.cc" ]

if (use_jumbo_build == true) {
jumbo_excluded_sources = [ "$target_gen_dir/embedded_trusted.cc" ]
}
jumbo_excluded_sources = [ "$target_gen_dir/embedded_trusted.cc" ]
}
} else if (v8_enable_embedded_builtins) {
sources += [ "$target_gen_dir/embedded.S" ]

if (v8_use_multi_snapshots) {
sources += [ "$target_gen_dir/embedded_trusted.S" ]

if (use_jumbo_build == true) {
jumbo_excluded_sources = [
# Duplicated symbols with embedded.S
"$target_gen_dir/embedded_trusted.S",
]
}
jumbo_excluded_sources = [
# Duplicated symbols with embedded.S
"$target_gen_dir/embedded_trusted.S",
]
}
} else {
sources += [ "src/snapshot/embedded-empty.cc" ]
Expand Down Expand Up @@ -1369,18 +1363,16 @@ v8_source_set("v8_initializers") {
"src/interpreter/interpreter-intrinsics-generator.h",
]

if (use_jumbo_build == true) {
jumbo_excluded_sources = [
# TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428
"src/builtins/builtins-async-iterator-gen.cc",
"src/builtins/builtins-async-generator-gen.cc",
jumbo_excluded_sources = [
# TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428
"src/builtins/builtins-async-iterator-gen.cc",
"src/builtins/builtins-async-generator-gen.cc",

# These source files take an unusually large amount of time to
# compile. Build them separately to avoid bottlenecks.
"src/builtins/builtins-regexp-gen.cc",
"src/code-stub-assembler.cc",
]
}
# These source files take an unusually large amount of time to
# compile. Build them separately to avoid bottlenecks.
"src/builtins/builtins-regexp-gen.cc",
"src/code-stub-assembler.cc",
]

if (v8_current_cpu == "x86") {
sources += [
Expand Down Expand Up @@ -2654,20 +2646,18 @@ v8_source_set("v8_base") {
sources += check_header_includes_sources
}

if (use_jumbo_build == true) {
jumbo_excluded_sources = [
# TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428
"src/profiler/heap-snapshot-generator.cc", # Macro clash in mman-linux.h
jumbo_excluded_sources = [
# TODO(mostynb@vewd.com): don't exclude these http://crbug.com/752428
"src/profiler/heap-snapshot-generator.cc", # Macro clash in mman-linux.h

# These source files take an unusually large amount of time to
# compile. Build them separately to avoid bottlenecks.
"src/api.cc",
"src/elements.cc",
"src/heap/heap.cc",
"src/objects.cc",
"src/parsing/parser.cc",
]
}
# These source files take an unusually large amount of time to
# compile. Build them separately to avoid bottlenecks.
"src/api.cc",
"src/elements.cc",
"src/heap/heap.cc",
"src/objects.cc",
"src/parsing/parser.cc",
]

if (v8_current_cpu == "x86") {
sources += [ ### gcmole(arch:ia32) ###
Expand Down Expand Up @@ -2810,13 +2800,11 @@ v8_source_set("v8_base") {
"src/regexp/arm64/regexp-macro-assembler-arm64.h",
"src/wasm/baseline/arm64/liftoff-assembler-arm64.h",
]
if (use_jumbo_build) {
jumbo_excluded_sources += [
# TODO(mostynb@vewd.com): fix this code so it doesn't need
# to be excluded, see the comments inside.
"src/arm64/instructions-arm64-constants.cc",
]
}
jumbo_excluded_sources += [
# TODO(mostynb@vewd.com): fix this code so it doesn't need
# to be excluded, see the comments inside.
"src/arm64/instructions-arm64-constants.cc",
]
} else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
sources += [ ### gcmole(arch:mipsel) ###
"src/compiler/backend/mips/code-generator-mips.cc",
Expand Down
10 changes: 3 additions & 7 deletions gni/v8.gni
Expand Up @@ -132,15 +132,11 @@ if (!build_with_chromium && is_clang) {
template("v8_source_set") {
if (defined(invoker.split_count) && invoker.split_count > 1 &&
defined(v8_static_library) && v8_static_library && is_win) {
link_target_type = "split_static_library"
link_target_type = "jumbo_split_static_library"
} else if (defined(v8_static_library) && v8_static_library) {
link_target_type = "static_library"
link_target_type = "jumbo_static_library"
} else {
if (use_jumbo_build) {
link_target_type = "jumbo_source_set"
} else {
link_target_type = "source_set"
}
link_target_type = "jumbo_source_set"
}
target(link_target_type, target_name) {
forward_variables_from(invoker,
Expand Down

0 comments on commit c566a40

Please sign in to comment.