diff options
author | dpranke <dpranke@chromium.org> | 2015-10-12 23:20:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-13 06:21:19 +0000 |
commit | d4da5ab4987c2c22d96dcf8c4b3ac2449aa16c0f (patch) | |
tree | 125f2ec1dce6d8d5beed45329388dd1d982d9714 | |
parent | db54eaf0cb213a4495dc2e4264fab57515b0a9d4 (diff) | |
download | chromium_src-d4da5ab4987c2c22d96dcf8c4b3ac2449aa16c0f.zip chromium_src-d4da5ab4987c2c22d96dcf8c4b3ac2449aa16c0f.tar.gz chromium_src-d4da5ab4987c2c22d96dcf8c4b3ac2449aa16c0f.tar.bz2 |
Move //build/module_args/v8.gni to //build_overrides.
The original intent of the build/module_args directory was to
provide a place where different repos could customize settings
as needed depending on their dependencies and needs.
However, given that you can't really yet embed GN by just
deps-ing in //build/config and //build/toolchain, you end up
needing to deps-in all of build, and so there was no good way to
have different settings per-repo in //build/module_args.
This CL changes the approach such that we will have an additional
top-level directory called //build_overrides, which is therefore
separate from //build and can be properly customized.
It is unfortunate that we need to use two top-level directories
for GN, but we don't have a good alternative at this time. Once
we can remove the GYP build and further clean up the structure
and dependencies of //build we will hopefully be able to do better.
R=brettw@chromium.org
BUG=541791
Review URL: https://codereview.chromium.org/1397493004
Cr-Commit-Position: refs/heads/master@{#353690}
-rw-r--r-- | BUILD.gn | 2 | ||||
-rw-r--r-- | build/config/BUILD.gn | 2 | ||||
-rw-r--r-- | build/module_args/v8.gni | 18 | ||||
-rw-r--r-- | build_overrides/README.md | 20 | ||||
-rw-r--r-- | build_overrides/v8.gni | 20 | ||||
-rw-r--r-- | chrome/android/BUILD.gn | 2 | ||||
-rw-r--r-- | chrome/installer/mini_installer/BUILD.gn | 2 | ||||
-rw-r--r-- | chrome/test/base/js2gtest.gni | 2 | ||||
-rw-r--r-- | components/html_viewer/BUILD.gn | 6 | ||||
-rw-r--r-- | content/shell/android/BUILD.gn | 6 | ||||
-rw-r--r-- | content/test/BUILD.gn | 6 | ||||
-rw-r--r-- | gin/BUILD.gn | 2 | ||||
-rw-r--r-- | net/BUILD.gn | 2 |
13 files changed, 56 insertions, 34 deletions
@@ -12,7 +12,7 @@ import("//build/config/crypto.gni") import("//build/config/features.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build/config/ui.gni") -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//media/media_options.gni") if (is_android) { diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 4af7389..97d7d04 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -8,7 +8,7 @@ import("//build/config/crypto.gni") import("//build/config/features.gni") import("//build/config/sanitizers/sanitizers.gni") import("//build/config/ui.gni") -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//build/toolchain/goma.gni") declare_args() { diff --git a/build/module_args/v8.gni b/build/module_args/v8.gni index f18bfaf..e1e5fae 100644 --- a/build/module_args/v8.gni +++ b/build/module_args/v8.gni @@ -2,19 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -if (is_android) { - import("//build/config/android/config.gni") -} +# TODO(dpranke): Remove this file altogether once v8 has been updated +# to import //build_overrides/v8.gni instead. -# TODO(sky): nuke this. Temporary while sorting out http://crbug.com/465456. -enable_correct_v8_arch = false - -v8_use_external_startup_data = !(is_chromeos || is_win || is_ios) - -# V8 extras -# Adding V8 extras files requires API owners review -# Be sure to synchronize with build/common.gypi - -v8_extra_library_files = [] -v8_experimental_extra_library_files = - [ "../third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js" ] +import("//build_overrides/v8.gni") diff --git a/build_overrides/README.md b/build_overrides/README.md new file mode 100644 index 0000000..d26312c --- /dev/null +++ b/build_overrides/README.md @@ -0,0 +1,20 @@ +# Build overrides in GN + +This directory is used to allow different products to customize settings +for repos that are DEPS'ed in or shared. + +For example: V8 could be built on its own (in a "standalone" configuration), +and it could be built as part of Chromium. V8 might define a top-level +target, //v8:d8 (a simple executable), that should only be built in the +standalone configuration. To figure out whether or not it should be +in a standalone configuration, v8 can create a file, build_overrides/v8.gni, +that contains a variable, `build_standalone_d8 = true`. +and import it (as import("//build_overrides/v8.gni") from its top-level +BUILD.gn file. + +Chromium, on the other hand, might not need to build d8, and so it would +create its own build_overrides/v8.gni file, and in it set +`build_standalone_d8 = false`. + +The two files should define the same set of variables, but the values can +vary as appropriate to the needs of the two different builds. diff --git a/build_overrides/v8.gni b/build_overrides/v8.gni new file mode 100644 index 0000000..4fc5f98 --- /dev/null +++ b/build_overrides/v8.gni @@ -0,0 +1,20 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if (is_android) { + import("//build/config/android/config.gni") +} + +# TODO(sky): nuke this. Temporary while sorting out http://crbug.com/465456. +enable_correct_v8_arch = false + +v8_use_external_startup_data = !(is_chromeos || is_win || is_ios) + +# V8 extras +# Adding V8 extras files requires API owners review +# Be sure to synchronize with build/common.gypi + +v8_extra_library_files = [] +v8_experimental_extra_library_files = + [ "../third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js" ] diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index f4263d3..5adb30c 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn @@ -4,7 +4,7 @@ import("//build/config/android/config.gni") import("//build/config/android/rules.gni") -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//chrome/version.gni") import("//testing/test.gni") import("//third_party/icu/config.gni") diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn index 100f25f..1e20d80 100644 --- a/chrome/installer/mini_installer/BUILD.gn +++ b/chrome/installer/mini_installer/BUILD.gn @@ -4,7 +4,7 @@ import("//build/config/features.gni") import("//build/config/ui.gni") -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//chrome/version.gni") import("//third_party/icu/config.gni") diff --git a/chrome/test/base/js2gtest.gni b/chrome/test/base/js2gtest.gni index f4b6c76..a995869 100644 --- a/chrome/test/base/js2gtest.gni +++ b/chrome/test/base/js2gtest.gni @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//v8/snapshot_toolchain.gni") # Variables: diff --git a/components/html_viewer/BUILD.gn b/components/html_viewer/BUILD.gn index f9a6217..47863ce 100644 --- a/components/html_viewer/BUILD.gn +++ b/components/html_viewer/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//mojo/public/mojo_application.gni") import("//testing/test.gni") import("//tools/grit/grit_rule.gni") @@ -357,9 +357,7 @@ mojo_native_application("apptests") { "//third_party/mojo/src/mojo/public/c/system:for_shared_library", ] - data_deps = [ - ":html_viewer", - ] + data_deps = [ ":html_viewer" ] if (is_linux && !is_android) { data_deps += [ "//components/font_service" ] diff --git a/content/shell/android/BUILD.gn b/content/shell/android/BUILD.gn index d0f3701..6aa4123 100644 --- a/content/shell/android/BUILD.gn +++ b/content/shell/android/BUILD.gn @@ -4,7 +4,7 @@ import("//build/config/android/config.gni") import("//build/config/android/rules.gni") -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//third_party/icu/config.gni") generate_jni("content_shell_jni_headers") { @@ -159,9 +159,7 @@ instrumentation_test_apk("content_shell_test_apk") { "//base:base_javatests", "//net/android:net_javatests", ] - data_deps = [ - ":content_shell_apk", - ] + data_deps = [ ":content_shell_apk" ] apk_under_test = ":content_shell_apk" apk_name = "ContentShellTest" android_manifest = "javatests/AndroidManifest.xml" diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 0f1a6a8..6208f6a 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni") import("//build/config/crypto.gni") import("//build/config/features.gni") import("//build/config/ui.gni") -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//media/media_options.gni") import("//testing/test.gni") import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") @@ -579,9 +579,7 @@ test("content_unittests") { ] } - data_deps = [ - "//third_party/mesa:osmesa", - ] + data_deps = [ "//third_party/mesa:osmesa" ] if (!is_win) { sources += [ "../browser/file_descriptor_info_impl_unittest.cc" ] diff --git a/gin/BUILD.gn b/gin/BUILD.gn index 4535074..5dc1aa8 100644 --- a/gin/BUILD.gn +++ b/gin/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//testing/test.gni") component("gin") { diff --git a/net/BUILD.gn b/net/BUILD.gn index 0075633..319e1e7 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn @@ -7,7 +7,7 @@ import("//build/config/compiler/compiler.gni") import("//build/config/crypto.gni") import("//build/config/features.gni") import("//build/config/ui.gni") -import("//build/module_args/v8.gni") +import("//build_overrides/v8.gni") import("//testing/test.gni") import("//third_party/icu/config.gni") import("//third_party/protobuf/proto_library.gni") |