Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: BUILD.gn

Issue 787873003: Run "gn format" on v8's BUILD.gn file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index e8631b410cfb73af55fd94a142676a1c2dda5103..474b24cf50ea939684473768d6ce04afc1152874 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -17,13 +17,13 @@ v8_enable_verify_heap = false
v8_interpreted_regexp = false
v8_object_print = false
v8_postmortem_support = false
+
# TODO(eseidel): The snapshot generated by the GN Android build crashes.
v8_use_snapshot = !is_android
v8_enable_extra_checks = is_debug
v8_target_arch = cpu_arch
v8_random_seed = "314159265"
-
###############################################################################
# Configurations
#
@@ -64,54 +64,34 @@ config("features") {
defines = []
if (v8_enable_disassembler == true) {
- defines += [
- "ENABLE_DISASSEMBLER",
- ]
+ defines += [ "ENABLE_DISASSEMBLER" ]
}
if (v8_enable_gdbjit == true) {
- defines += [
- "ENABLE_GDB_JIT_INTERFACE",
- ]
+ defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
}
if (v8_object_print == true) {
- defines += [
- "OBJECT_PRINT",
- ]
+ defines += [ "OBJECT_PRINT" ]
}
if (v8_enable_verify_heap == true) {
- defines += [
- "VERIFY_HEAP",
- ]
+ defines += [ "VERIFY_HEAP" ]
}
if (v8_interpreted_regexp == true) {
- defines += [
- "V8_INTERPRETED_REGEXP",
- ]
+ defines += [ "V8_INTERPRETED_REGEXP" ]
}
if (v8_deprecation_warnings == true) {
- defines += [
- "V8_DEPRECATION_WARNINGS",
- ]
+ defines += [ "V8_DEPRECATION_WARNINGS" ]
}
if (v8_enable_i18n_support == true) {
- defines += [
- "V8_I18N_SUPPORT",
- ]
+ defines += [ "V8_I18N_SUPPORT" ]
}
if (v8_enable_extra_checks == true) {
- defines += [
- "ENABLE_EXTRA_CHECKS",
- ]
+ defines += [ "ENABLE_EXTRA_CHECKS" ]
}
if (v8_enable_handle_zapping == true) {
- defines += [
- "ENABLE_HANDLE_ZAPPING",
- ]
+ defines += [ "ENABLE_HANDLE_ZAPPING" ]
}
if (v8_use_external_startup_data == true) {
- defines += [
- "V8_USE_EXTERNAL_STARTUP_DATA",
- ]
+ defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
}
}
@@ -124,24 +104,16 @@ config("toolchain") {
# TODO(jochen): Add support for arm, mips, mipsel.
if (v8_target_arch == "arm64") {
- defines += [
- "V8_TARGET_ARCH_ARM64",
- ]
+ defines += [ "V8_TARGET_ARCH_ARM64" ]
}
if (v8_target_arch == "x86") {
- defines += [
- "V8_TARGET_ARCH_IA32",
- ]
+ defines += [ "V8_TARGET_ARCH_IA32" ]
}
if (v8_target_arch == "x64") {
- defines += [
- "V8_TARGET_ARCH_X64",
- ]
+ defines += [ "V8_TARGET_ARCH_X64" ]
}
if (is_win) {
- defines += [
- "WIN32",
- ]
+ defines += [ "WIN32" ]
# TODO(jochen): Support v8_enable_prof.
}
@@ -204,7 +176,7 @@ action("js2c") {
]
outputs = [
- "$target_gen_dir/libraries.cc"
+ "$target_gen_dir/libraries.cc",
]
if (v8_enable_i18n_support) {
@@ -212,15 +184,15 @@ action("js2c") {
}
args = [
- rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
- "CORE",
- ] + rebase_path(sources, root_build_dir)
+ rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
+ "CORE",
+ ] + rebase_path(sources, root_build_dir)
if (v8_use_external_startup_data) {
outputs += [ "$target_gen_dir/libraries.bin" ]
args += [
"--startup_blob",
- rebase_path("$target_gen_dir/libraries.bin", root_build_dir)
+ rebase_path("$target_gen_dir/libraries.bin", root_build_dir),
]
}
}
@@ -245,23 +217,24 @@ action("js2c_experimental") {
"src/harmony-classes.js",
"src/harmony-tostring.js",
"src/harmony-templates.js",
- "src/harmony-regexp.js"
+ "src/harmony-regexp.js",
]
outputs = [
- "$target_gen_dir/experimental-libraries.cc"
+ "$target_gen_dir/experimental-libraries.cc",
]
args = [
- rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir),
- "EXPERIMENTAL",
- ] + rebase_path(sources, root_build_dir)
+ rebase_path("$target_gen_dir/experimental-libraries.cc",
+ root_build_dir),
+ "EXPERIMENTAL",
+ ] + rebase_path(sources, root_build_dir)
if (v8_use_external_startup_data) {
outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
args += [
"--startup_blob",
- rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir)
+ rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir),
]
}
}
@@ -272,16 +245,16 @@ if (v8_use_external_startup_data) {
deps = [
":js2c",
- ":js2c_experimental"
+ ":js2c_experimental",
]
sources = [
"$target_gen_dir/libraries.bin",
- "$target_gen_dir/libraries_experimental.bin"
+ "$target_gen_dir/libraries_experimental.bin",
]
outputs = [
- "$root_out_dir/natives_blob.bin"
+ "$root_out_dir/natives_blob.bin",
]
script = "tools/concatenate-files.py"
@@ -301,23 +274,24 @@ action("postmortem-metadata") {
]
outputs = [
- "$target_gen_dir/debug-support.cc"
+ "$target_gen_dir/debug-support.cc",
]
- args =
- rebase_path(outputs, root_build_dir) +
- rebase_path(sources, root_build_dir)
+ args = rebase_path(outputs, root_build_dir) +
+ rebase_path(sources, root_build_dir)
}
action("run_mksnapshot") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
- deps = [ ":mksnapshot($host_toolchain)" ]
+ deps = [
+ ":mksnapshot($host_toolchain)",
+ ]
script = "tools/run.py"
outputs = [
- "$target_gen_dir/snapshot.cc"
+ "$target_gen_dir/snapshot.cc",
]
args = [
@@ -325,24 +299,27 @@ action("run_mksnapshot") {
"root_out_dir") + "/mksnapshot",
root_build_dir),
"--log-snapshot-positions",
- "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
- rebase_path("$target_gen_dir/snapshot.cc", root_build_dir)
+ "--logfile",
+ rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
+ rebase_path("$target_gen_dir/snapshot.cc", root_build_dir),
]
if (v8_random_seed != "0") {
- args += [ "--random-seed", v8_random_seed ]
+ args += [
+ "--random-seed",
+ v8_random_seed,
+ ]
}
if (v8_use_external_startup_data) {
outputs += [ "$root_out_dir/snapshot_blob.bin" ]
args += [
"--startup_blob",
- rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir)
+ rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir),
]
}
}
-
###############################################################################
# Source Sets (aka static libraries)
#
@@ -364,7 +341,11 @@ source_set("v8_nosnapshot") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config", ":features", ":toolchain" ]
+ configs += [
+ ":internal_config",
+ ":features",
+ ":toolchain",
+ ]
}
source_set("v8_snapshot") {
@@ -385,7 +366,11 @@ source_set("v8_snapshot") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config", ":features", ":toolchain" ]
+ configs += [
+ ":internal_config",
+ ":features",
+ ":toolchain",
+ ]
}
if (v8_use_external_startup_data) {
@@ -407,7 +392,11 @@ if (v8_use_external_startup_data) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config", ":features", ":toolchain" ]
+ configs += [
+ ":internal_config",
+ ":features",
+ ":toolchain",
+ ]
}
}
@@ -1212,7 +1201,11 @@ source_set("v8_base") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config", ":features", ":toolchain" ]
+ configs += [
+ ":internal_config",
+ ":features",
+ ":toolchain",
+ ]
if (!is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
@@ -1220,7 +1213,9 @@ source_set("v8_base") {
}
defines = []
- deps = [ ":v8_libbase" ]
+ deps = [
+ ":v8_libbase",
+ ]
if (is_win) {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
@@ -1232,6 +1227,7 @@ source_set("v8_base") {
if (is_win) {
deps += [ "//third_party/icu:icudata" ]
}
+
# TODO(jochen): Add support for icu_use_data_file_flag
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
} else {
@@ -1300,7 +1296,11 @@ source_set("v8_libbase") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config_base", ":features", ":toolchain" ]
+ configs += [
+ ":internal_config_base",
+ ":features",
+ ":toolchain",
+ ]
if (!is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
@@ -1310,15 +1310,11 @@ source_set("v8_libbase") {
defines = []
if (is_posix) {
- sources += [
- "src/base/platform/platform-posix.cc"
- ]
+ sources += [ "src/base/platform/platform-posix.cc" ]
}
if (is_linux) {
- sources += [
- "src/base/platform/platform-linux.cc"
- ]
+ sources += [ "src/base/platform/platform-linux.cc" ]
libs = [ "rt" ]
} else if (is_android) {
@@ -1347,7 +1343,10 @@ source_set("v8_libbase") {
defines += [ "_CRT_RAND_S" ] # for rand_s()
- libs = [ "winmm.lib", "ws2_32.lib" ]
+ libs = [
+ "winmm.lib",
+ "ws2_32.lib",
+ ]
}
# TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
@@ -1366,7 +1365,11 @@ source_set("v8_libplatform") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config_base", ":features", ":toolchain" ]
+ configs += [
+ ":internal_config_base",
+ ":features",
+ ":toolchain",
+ ]
if (!is_debug) {
configs -= [ "//build/config/compiler:optimize" ]
@@ -1392,7 +1395,11 @@ if (current_toolchain == host_toolchain) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config", ":features", ":toolchain" ]
+ configs += [
+ ":internal_config",
+ ":features",
+ ":toolchain",
+ ]
deps = [
":v8_base",
@@ -1408,64 +1415,64 @@ if (current_toolchain == host_toolchain) {
#
if (component_mode == "shared_library") {
+ component("v8") {
+ sources = [
+ "src/v8dll-main.cc",
+ ]
-component("v8") {
- sources = [
- "src/v8dll-main.cc",
- ]
+ if (v8_use_snapshot && v8_use_external_startup_data) {
+ deps = [
+ ":v8_base",
+ ":v8_external_snapshot",
+ ]
+ } else if (v8_use_snapshot) {
+ deps = [
+ ":v8_base",
+ ":v8_snapshot",
+ ]
+ } else {
+ assert(!v8_use_external_startup_data)
+ deps = [
+ ":v8_base",
+ ":v8_nosnapshot",
+ ]
+ }
- if (v8_use_snapshot && v8_use_external_startup_data) {
- deps = [
- ":v8_base",
- ":v8_external_snapshot",
- ]
- } else if (v8_use_snapshot) {
- deps = [
- ":v8_base",
- ":v8_snapshot",
- ]
- } else {
- assert(!v8_use_external_startup_data)
- deps = [
- ":v8_base",
- ":v8_nosnapshot",
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [
+ ":internal_config",
+ ":features",
+ ":toolchain",
]
- }
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config", ":features", ":toolchain" ]
-
- direct_dependent_configs = [ ":external_config" ]
+ direct_dependent_configs = [ ":external_config" ]
- libs = []
- if (is_android && current_toolchain != host_toolchain) {
- libs += [ "log" ]
+ libs = []
+ if (is_android && current_toolchain != host_toolchain) {
+ libs += [ "log" ]
+ }
}
-}
-
} else {
+ group("v8") {
+ if (v8_use_snapshot && v8_use_external_startup_data) {
+ deps = [
+ ":v8_base",
+ ":v8_external_snapshot",
+ ]
+ } else if (v8_use_snapshot) {
+ deps = [
+ ":v8_base",
+ ":v8_snapshot",
+ ]
+ } else {
+ assert(!v8_use_external_startup_data)
+ deps = [
+ ":v8_base",
+ ":v8_nosnapshot",
+ ]
+ }
-group("v8") {
- if (v8_use_snapshot && v8_use_external_startup_data) {
- deps = [
- ":v8_base",
- ":v8_external_snapshot",
- ]
- } else if (v8_use_snapshot) {
- deps = [
- ":v8_base",
- ":v8_snapshot",
- ]
- } else {
- assert(!v8_use_external_startup_data)
- deps = [
- ":v8_base",
- ":v8_nosnapshot",
- ]
+ direct_dependent_configs = [ ":external_config" ]
}
-
- direct_dependent_configs = [ ":external_config" ]
-}
-
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698