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

Unified Diff: BUILD.gn

Issue 2848943003: [infra] Assembles the SDK using GN rather than create_sdk.py (Closed)
Patch Set: Move copy_dev_compiler_tools out of the default full SDK build Created 3 years, 7 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 | build/config/BUILDCONFIG.gn » ('j') | 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 f37232f4b799773700f71f6d7c5a259b572a0f6d..e12a15e5fc6edf25b8fc1614593c33ae4a04256c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -4,7 +4,7 @@
# This target will be built if no target is specified when invoking ninja.
group("default") {
- if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) {
+ if (is_fuchsia || is_fuchsia_host) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
@@ -14,7 +14,7 @@ group("default") {
}
group("most") {
- if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) {
+ if (is_fuchsia || is_fuchsia_host) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
@@ -30,7 +30,7 @@ group("most") {
}
group("runtime") {
- if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) {
+ if (is_fuchsia || is_fuchsia_host) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
@@ -46,7 +46,7 @@ group("runtime") {
}
group("runtime_kernel") {
- if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) {
+ if (is_fuchsia || is_fuchsia_host) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
@@ -121,85 +121,83 @@ group("samples") {
# The rules below build a qemu Fuchsia OS image that includes the Dart tree
# under /system/test/dart. Building this image is gated by the GN argument
# 'dart_build_fuchsia_test_image' because building the image is slow.
-if (defined(is_fuchsia) && is_fuchsia) {
+if (is_fuchsia) {
declare_args() {
dart_build_fuchsia_test_image = false
}
- if (dart_build_fuchsia_test_image) {
- action("generate_dart_test_manifest") {
- testonly = true
-
- deps = [
- "//packages/gn:mkbootfs",
- ]
-
- output_prefix = "$target_gen_dir/dart_test_tree"
- outputs = [
- "$output_prefix.manifest",
- ]
-
- mode = "release"
- if (is_debug) {
- mode = "debug"
- }
-
- mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
- user_manifest = "$mkbootfs_gen/user.bootfs.manifest"
-
- script = "tools/gen_fuchsia_test_manifest.py"
- args = [
- "-m",
- mode,
- "-u",
- rebase_path(user_manifest),
- "-o",
- rebase_path(output_prefix),
- ]
+ action("generate_dart_test_manifest") {
+ testonly = true
+
+ deps = [
+ "//packages/gn:mkbootfs",
+ ]
+
+ output_prefix = "$target_gen_dir/dart_test_tree"
+ outputs = [
+ "$output_prefix.manifest",
+ ]
+
+ mode = "release"
+ if (is_debug) {
+ mode = "debug"
}
- action("generate_dart_test_image") {
- testonly = true
- deps = [
- ":generate_dart_test_manifest",
- "runtime/bin:dart",
- "runtime/bin:process_test",
- "runtime/bin:run_vm_tests",
- ]
-
- # Compute path to magenta bootdata.bin
- if (current_cpu == "arm64") {
- magenta_bootdata =
- "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin"
- } else if (current_cpu == "x64") {
- magenta_bootdata =
- "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin"
- } else {
- assert(false, "unable to determine path to magenta's bootdata.bin")
- }
-
- input = "$target_gen_dir/dart_test_tree.manifest"
- inputs = [
- magenta_bootdata,
- input,
- ]
-
- output = "$root_out_dir/dart_test_tree.bin"
- outputs = [
- output,
- ]
-
- script = "//packages/gn/make_bootfs.py"
- args = [
- "--manifest",
- rebase_path(input),
- "--output-file",
- rebase_path(output),
- "--build-id-map",
- rebase_path("$target_gen_dir/build_id_map"),
- "--pre-binaries",
- rebase_path(magenta_bootdata),
- ]
+ mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
+ user_manifest = "$mkbootfs_gen/user.bootfs.manifest"
+
+ script = "tools/gen_fuchsia_test_manifest.py"
+ args = [
+ "-m",
+ mode,
+ "-u",
+ rebase_path(user_manifest),
+ "-o",
+ rebase_path(output_prefix),
+ ]
+ }
+
+ action("generate_dart_test_image") {
+ testonly = true
+ deps = [
+ ":generate_dart_test_manifest",
+ "runtime/bin:dart",
+ "runtime/bin:process_test",
+ "runtime/bin:run_vm_tests",
+ ]
+
+ # Compute path to magenta bootdata.bin
+ if (current_cpu == "arm64") {
+ magenta_bootdata =
+ "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin"
+ } else if (current_cpu == "x64") {
+ magenta_bootdata =
+ "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin"
+ } else {
+ assert(false, "unable to determine path to magenta's bootdata.bin")
}
+
+ input = "$target_gen_dir/dart_test_tree.manifest"
+ inputs = [
+ magenta_bootdata,
+ input,
+ ]
+
+ output = "$root_out_dir/dart_test_tree.bin"
+ outputs = [
+ output,
+ ]
+
+ script = "//packages/gn/make_bootfs.py"
+ args = [
+ "--manifest",
+ rebase_path(input),
+ "--output-file",
+ rebase_path(output),
+ "--build-id-map",
+ rebase_path("$target_gen_dir/build_id_map"),
+ "--pre-binaries",
+ rebase_path(magenta_bootdata),
+ ]
}
}
« no previous file with comments | « no previous file | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698