-
Notifications
You must be signed in to change notification settings - Fork 3
/
BUILD.gn
96 lines (84 loc) · 3.61 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Copyright (c) 2013 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.
# This is the root build file for GN. GN will start processing by loading this
# file, and recursively load all dependencies until all dependencies are either
# resolved or known not to exist (which will cause the build to fail). So if
# you add a new build file, there must be some path of dependencies from this
# file to your new one or GN won't know about it.
import("//build/config/compiler/compiler.gni")
import("//build/config/sanitizers/sanitizers.gni")
#import("//build/util/generate_wrapper.gni")
#import("//extensions/buildflags/buildflags.gni")
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
declare_args() {
# A list of extra dependencies to add to the root target. This allows a
# checkout to add additional targets without explicitly changing any checked-
# in files.
root_extra_deps = []
}
if (is_official_build) {
# An official (maximally optimized!) component (optimized for build times)
# build doesn't make sense and usually doesn't work.
assert(!is_component_build)
}
# This file defines the following two main targets:
#
# "gn_all" is used to create explicit dependencies from the root BUILD.gn to
# each top-level component that we wish to include when building everything via
# "all". This is required since the set of targets built by "all" is determined
# automatically based on reachability from the root BUILD.gn (for details, see
# crbug.com/503241). Builders should typically use "all", or list targets
# explicitly, rather than relying on "gn_all".
#
# "gn_visibility": targets that are normally not visible to top-level targets,
# but are built anyway by "all". Since we don't want any such targets, we have
# this placeholder to make sure hidden targets that aren't otherwise depended
# on yet are accounted for.
group("gn_all") {
testonly = true
if (!is_ios) {
deps = [
"//mojo/core/embedder",
"//mojo",
"//samples/echo",
]
}
deps += root_extra_deps
if (is_android) {
deps += [
#"//base/android/jni_generator:jni_generator_tests",
#"//build/android/gyp/test:hello_world",
#"//build/android/gyp/test:hello_world",
#"//build/android/stacktrace:java_deobfuscate",
#"//tools/android:android_tools",
#"//tools/android:memconsumer",
#"//tools/android:push_apps_to_background",
#"//tools/android/audio_focus_grabber:audio_focus_grabber_apk",
#"//tools/android/customtabs_benchmark:customtabs_benchmark_apk",
#"//tools/android/errorprone_plugin:errorprone_plugin_java",
#"//tools/android/kerberos/SpnegoAuthenticator:spnego_authenticator_apk",
"//samples/shell/android:samples_shell_apk",
"//samples_affiliate/shell/android:samples_affiliate_shell_apk",
]
}
}
if (is_android) {
group("optimize_gn_gen") {
deps = [
# These run expensive scripts in non-default toolchains. Generally, host
# toolchain targets are loaded in the later part of the run, and the
# result is they push out the end of generation. By preloading these, the
# scripts can be parallelized with the rest of the load.
"//build/config/linux(//build/toolchain/linux:clang_x64)",
"//build/config/posix(//build/toolchain/linux:clang_x64)",
# Include x86 toolchains as well since V8 uses them for 32-bit snapshot
# generation.
"//build/config/linux(//build/toolchain/linux:clang_x86)",
"//build/config/posix(//build/toolchain/linux:clang_x86)",
]
}
}