Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Fuchsia OS
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hacrwang
Fuchsia OS
Commits
0d4917c4
Commit
0d4917c4
authored
5 years ago
by
docs-roller
Browse files
Options
Downloads
Patches
Plain Diff
[gndoc] Update GN build arguments documentation
Test: CQ Change-Id: I6ae5d995f2e9c824b82aff9c9c985d604e7a6cbf
parent
cf4e1a01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/gen/build_arguments.md
+1445
-1445
1445 additions, 1445 deletions
docs/gen/build_arguments.md
zircon/docs/gen/build_arguments.md
+205
-205
205 additions, 205 deletions
zircon/docs/gen/build_arguments.md
with
1650 additions
and
1650 deletions
docs/gen/build_arguments.md
+
1445
−
1445
View file @
0d4917c4
This diff is collapsed.
Click to expand it.
zircon/docs/gen/build_arguments.md
+
205
−
205
View file @
0d4917c4
...
@@ -2,16 +2,71 @@
...
@@ -2,16 +2,71 @@
## All builds
## All builds
### current_os
### asan_default_options
Default
[
AddressSanitizer
](
https://llvm.org/docs/AddressSanitizer.html
)
options (before the
`ASAN_OPTIONS`
environment variable is read at
runtime). This can be set as a build argument to affect most "asan"
variants in $variants (which see), or overridden in $toolchain_args in
one of those variants. Note that setting this nonempty may conflict
with programs that define their own
`__asan_default_options`
C
function.
**Current value (from the default):**
`""`
**Current value (from the default):**
`""`
### enable_acpi_debug
From //public/gn/config/instrumentation/BUILD.gn:15
Enable debug output in the ACPI library (used by the ACPI bus driver).
**Current value (from the default):**
`false`
### symbol_level
*
0 means no debugging information.
*
1 means minimal debugging information sufficient to symbolize backtraces.
*
2 means full debugging information for use with a symbolic debugger.
From //third_party/lib/acpica/BUILD.gn:9
**Current value (from the default):**
`2`
From //public/gn/config/levels.gni:20
### thinlto_cache_dir
ThinLTO cache directory path.
**Current value (from the default):**
`"user-arm64-thinlto.shlib/thinlto-cache"`
From //public/gn/config/lto/BUILD.gn:22
### build_id_dir
Directory to populate with
`xx/yyy`
and
`xx/yyy.debug`
links to ELF
files. For every ELF binary built, with build ID
`xxyyy`
(lowercase
hexadecimal of any length),
`xx/yyy`
is a hard link to the stripped
file and
`xx/yyy.debug`
is a hard link to the unstripped file.
Symbolization tools and debuggers find symbolic information this way.
**Current value (from the default):**
`"/b/s/w/ir/k/out/build-zircon/.build-id"`
From //public/gn/toolchain/c_toolchain.gni:17
### kernel_version_string
Version string embedded in the kernel for
`zx_system_get_version`
.
If set to the default "", a string is generated based on the
Zircon git revision of the checkout.
**Current value (from the default):**
`""`
From //kernel/lib/version/BUILD.gn:9
### use_prebuilt_gcc
If $gcc_tool_dir is "", then this controls how the GCC toolchain
binaries are found. If true, the standard prebuilt is used. If false,
the tools are just expected to be found in PATH.
**Current value (from the default):**
`true`
From //public/gn/toolchain/gcc.gni:9
### current_cpu
**Current value (from the default):**
`""`
### current_os
**Current value (from the default):**
`""`
### enable_kernel_debugging_features
### enable_kernel_debugging_features
Whether to include various features (non-shipping, insecure, etc.) in the
Whether to include various features (non-shipping, insecure, etc.) in the
...
@@ -25,48 +80,52 @@ From //public/gn/config/product_parameters.gni:12
...
@@ -25,48 +80,52 @@ From //public/gn/config/product_parameters.gni:12
**Current value (from the default):**
`"x64"`
**Current value (from the default):**
`"x64"`
### kernel_extra_defines
### clang_tool_dir
Extra macro definitions for kernel code, e.g. "DISABLE_KASLR",
Directory where the Clang toolchain binaries ("clang", "llvm-nm", etc.) are
"ENABLE_KERNEL_LL_DEBUG".
found. If this is "", then the behavior depends on $use_prebuilt_clang.
This toolchain is expected to support both Fuchsia targets and the host.
**Current value (from the default):**
`
[]
`
**Current value (from the default):**
`
""
`
From //
kernel/params
.gni:4
6
From //
public/gn/toolchain/clang
.gni:
1
4
### opt_level
### enable_netsvc_debugging_features
*
-1 means really unoptimized (-O0), usually only build-tested and not run.
*
0 means "optimized for debugging" (-Og), light enough to avoid confusion.
1, 2, and 3 are increasing levels of optimization.
*
4 is optimized for space rather than purely for speed.
**Current value (from the default):**
`
2
`
**Current value (from the default):**
`
false
`
From //public/gn/config/
level
s.gni:1
5
From //public/gn/config/
product_parameter
s.gni:1
3
### use_prebuilt_gcc
### enable_user_pci
If $gcc_tool_dir is "", then this controls how the GCC toolchain
Enable userspace PCI and disable kernel PCI.
binaries are found. If true, the standard prebuilt is used. If false,
the tools are just expected to be found in PATH.
**Current value (from the default):**
`
tru
e`
**Current value (from the default):**
`
fals
e`
From //
public/gn/toolchain/gcc
.gni:
9
From //
kernel/params
.gni:
42
### thinlto_jobs
### target_os
Number of parallel ThinLTO jobs.
**Current value (from the default):**
`
8
`
**Current value (from the default):**
`
""
`
From //public/gn/config/lto/BUILD.gn:19
### kernel_extra_defines
Extra macro definitions for kernel code, e.g. "DISABLE_KASLR",
"ENABLE_KERNEL_LL_DEBUG".
### use_prebuilt_clang
**Current value (from the default):**
`[]`
If $clang_tool_dir is "", then this controls how the Clang toolchain
binaries are found. If true, then the standard prebuilt is used.
Otherwise the tools are just expected to be found by the shell via
`PATH`
.
**Current value (from the default):**
`true`
From //kernel/params.gni:46
From //public/gn/toolchain/clang.gni:9
### malloc
**Current value (from the default):**
`"scudo"`
From //third_party/ulib/musl/BUILD.gn:6
### smp_max_cpus
Maximum number of CPUs the kernel will run on (others will be ignored).
**Current value (from the default):**
`32`
From //kernel/params.gni:7
### assert_level
### assert_level
*
0 means no assertions, not even standard C
`assert()`
.
*
0 means no assertions, not even standard C
`assert()`
.
...
@@ -77,18 +136,35 @@ From //public/gn/toolchain/clang.gni:9
...
@@ -77,18 +136,35 @@ From //public/gn/toolchain/clang.gni:9
From //public/gn/config/levels.gni:9
From //public/gn/config/levels.gni:9
###
crash_diagnostics_dir
###
enable_acpi_debug
Clang crash reports directory path. Use empty path to disable altogeth
er.
Enable debug output in the ACPI library (used by the ACPI bus driv
er
)
.
**Current value (from the default):**
`
"/b/s/w/ir/k/out/build-zircon/clang-crashreports"
`
**Current value (from the default):**
`
false
`
From //
public/gn/config
/BUILD.gn:
11
From //
third_party/lib/acpica
/BUILD.gn:
9
### target_cpu
### enable_lock_dep
Enable kernel lock dependency tracking.
**Current value (from the default):**
`
""
`
**Current value (from the default):**
`
false
`
### target_os
From //kernel/params.gni:32
### host_os
**Current value (from the default):**
`"linux"`
### opt_level
*
-1 means really unoptimized (-O0), usually only build-tested and not run.
*
0 means "optimized for debugging" (-Og), light enough to avoid confusion.
1, 2, and 3 are increasing levels of optimization.
*
4 is optimized for space rather than purely for speed.
**Current value (from the default):**
`2`
From //public/gn/config/levels.gni:15
### target_cpu
**Current value (from the default):**
`""`
**Current value (from the default):**
`""`
...
@@ -102,12 +178,50 @@ to be pared down.
...
@@ -102,12 +178,50 @@ to be pared down.
From //BUILD.gn:16
From //BUILD.gn:16
### thinlto_cache_dir
### toolchain
ThinLTO cache directory path.
*This must never be set as a build argument.*
It exists only to be set via c_toolchain().
See environment() for more information.
**Current value (from the default):**
```
{
configs = []
environment = "stub"
globals = { }
label = "//public/gn/toolchain:stub"
}
```
**Current value (from the default):**
`"user-arm64-thinlto/thinlto-cache"`
From //public/gn/BUILDCONFIG.gn:20
From //public/gn/config/lto/BUILD.gn:22
### default_deps
Defines the
`//:default`
target: what
`ninja`
with no arguments does.
**Current value (from the default):**
`[":build-tests", ":ids", ":images", ":tools"]`
From //BUILD.gn:19
### detailed_scheduler_tracing
Enable detailed scheduler traces.
**Current value (from the default):**
`false`
From //kernel/params.gni:39
### enable_fair_scheduler
Disable fair scheduler by default on all architectures.
ZX-3959: Disable by default until E2E tests stabilize.
**Current value (from the default):**
`false`
From //kernel/params.gni:36
### kernel_base
**Current value (from the default):**
`"0xffffffff80100000"`
From //kernel/params.gni:20
### variants
### variants
List of "selectors" to request variant builds of certain targets. Each
List of "selectors" to request variant builds of certain targets. Each
...
@@ -331,53 +445,18 @@ Variant scope parameters
...
@@ -331,53 +445,18 @@ Variant scope parameters
From //public/gn/toolchain/variants.gni:222
From //public/gn/toolchain/variants.gni:222
### enable_user_pci
### zx
Enable userspace PCI and disable kernel PCI.
*This must never be set as a build argument*
.
**Current value (from the default):**
`false`
From //kernel/params.gni:42
### kernel_aspace_base
**Current value (from the default):**
`"0xffffff8000000000UL"`
From //kernel/params.gni:28
### kernel_version_string
Version string embedded in the kernel for
`zx_system_get_version`
.
If set to the default "", a string is generated based on the
Zircon git revision of the checkout.
**Current value (from the default):**
`""`
From //kernel/lib/version/BUILD.gn:9
### build_id_dir
Directory to populate with
`xx/yyy`
and
`xx/yyy.debug`
links to ELF
files. For every ELF binary built, with build ID
`xxyyy`
(lowercase
hexadecimal of any length),
`xx/yyy`
is a hard link to the stripped
file and
`xx/yyy.debug`
is a hard link to the unstripped file.
Symbolization tools and debuggers find symbolic information this way.
**Current value (from the default):**
`"/b/s/w/ir/k/out/build-zircon/.build-id"`
From //public/gn/toolchain/c_toolchain.gni:17
### enable_fair_scheduler
Disable fair scheduler by default on all architectures.
ZX-3959: Disable by default until E2E tests stabilize.
**Current value (from the default):**
`false`
From //kernel/params.gni:36
### enable_lock_dep
"$zx/" is the prefix for GN "source-absolute" paths in the Zircon
Enable kernel lock dependency tracking.
build. When Zircon is built standalone, the Zircon repository is the
root of the build (where
`.gn`
is found) so "$zx/" becomes "//". When
Zircon is part of a larger unified build, there is a higher-level
`.gn`
file that uses
`default_args`
to set "$zx/" to "//zircon/".
**Current value (from the default):**
`
false
`
**Current value (from the default):**
`
"/"
`
From //
kernel/params.gni:32
From //
public/gn/BUILDCONFIG.gn:13
### gcc_tool_dir
### gcc_tool_dir
Directory where the GCC toolchain binaries ("gcc", "nm", etc.) are
Directory where the GCC toolchain binaries ("gcc", "nm", etc.) are
...
@@ -391,11 +470,32 @@ system-installed tools found by the shell via `PATH` will be used.
...
@@ -391,11 +470,32 @@ system-installed tools found by the shell via `PATH` will be used.
From //public/gn/toolchain/gcc.gni:17
From //public/gn/toolchain/gcc.gni:17
### kernel_base
### kernel_
aspace_
base
**Current value (from the default):**
`"0xffffff
ff
80
1
00000"`
**Current value (from the default):**
`"0xffffff80
0
00000
00UL
"`
From //kernel/params.gni:20
From //kernel/params.gni:28
### sysroot
The
`--sysroot`
directory for host compilations.
This can be a string, which only applies to $host_os-$host_cpu.
Or it can be a list of scopes containing
`cpu`
,
`os`
, and
`sysroot`
.
The empty list (or empty string) means don't use
`--sysroot`
at all.
**Current value (from the default):**
```
[{
cpu = "arm64"
os = "linux"
sysroot = "//prebuilt/downloads/sysroot/linux-arm64"
}, {
cpu = "x64"
os = "linux"
sysroot = "//prebuilt/downloads/sysroot/linux-x64"
}]
```
From //public/gn/config/BUILD.gn:17
### use_ccache
### use_ccache
Set to true to enable compiling with ccache.
Set to true to enable compiling with ccache.
...
@@ -411,25 +511,21 @@ Set to true to enable distributed compilation using Goma.
...
@@ -411,25 +511,21 @@ Set to true to enable distributed compilation using Goma.
From //public/gn/toolchain/goma.gni:9
From //public/gn/toolchain/goma.gni:9
### zx
### use_prebuilt_clang
*This must never be set as a build argument*
.
If $clang_tool_dir is "", then this controls how the Clang toolchain
binaries are found. If true, then the standard prebuilt is used.
"$zx/" is the prefix for GN "source-absolute" paths in the Zircon
Otherwise the tools are just expected to be found by the shell via
`PATH`
.
build. When Zircon is built standalone, the Zircon repository is the
root of the build (where
`.gn`
is found) so "$zx/" becomes "//". When
Zircon is part of a larger unified build, there is a higher-level
`.gn`
file that uses
`default_args`
to set "$zx/" to "//zircon/".
**Current value (from the default):**
`
"/"
`
**Current value (from the default):**
`
true
`
From //public/gn/
BUILDCONFIG.gn:13
From //public/gn/
toolchain/clang.gni:9
###
detailed_scheduler_tracing
###
crash_diagnostics_dir
Enable detailed scheduler traces
.
Clang crash reports directory path. Use empty path to disable altogether
.
**Current value (from the default):**
`
false
`
**Current value (from the default):**
`
"/b/s/w/ir/k/out/build-zircon/clang-crashreports"
`
From //
kernel/params.gni:39
From //
public/gn/config/BUILD.gn:11
### enable_lock_dep_tests
### enable_lock_dep_tests
Enable kernel lock dependency tracking tests. By default this is
Enable kernel lock dependency tracking tests. By default this is
...
@@ -441,12 +537,6 @@ disabled.
...
@@ -441,12 +537,6 @@ disabled.
From //kernel/params.gni:54
From //kernel/params.gni:54
### enable_netsvc_debugging_features
**Current value (from the default):**
`false`
From //public/gn/config/product_parameters.gni:13
### goma_dir
### goma_dir
Absolute directory containing the Goma source code.
Absolute directory containing the Goma source code.
...
@@ -454,100 +544,10 @@ Absolute directory containing the Goma source code.
...
@@ -454,100 +544,10 @@ Absolute directory containing the Goma source code.
From //public/gn/toolchain/goma.gni:12
From //public/gn/toolchain/goma.gni:12
### smp_max_cpus
### thinlto_jobs
Maximum number of CPUs the kernel will run on (others will be ignored).
Number of parallel ThinLTO jobs.
**Current value (from the default):**
`32`
From //kernel/params.gni:7
### toolchain
*This must never be set as a build argument.*
It exists only to be set via c_toolchain().
See environment() for more information.
**Current value (from the default):**
```
{
configs = []
environment = "stub"
globals = { }
label = "//public/gn/toolchain:stub"
}
```
From //public/gn/BUILDCONFIG.gn:20
### asan_default_options
Default
[
AddressSanitizer
](
https://llvm.org/docs/AddressSanitizer.html
)
options (before the
`ASAN_OPTIONS`
environment variable is read at
runtime). This can be set as a build argument to affect most "asan"
variants in $variants (which see), or overridden in $toolchain_args in
one of those variants. Note that setting this nonempty may conflict
with programs that define their own
`__asan_default_options`
C
function.
**Current value (from the default):**
`""`
From //public/gn/config/instrumentation/BUILD.gn:15
### host_os
**Current value (from the default):**
`"linux"`
### sysroot
The
`--sysroot`
directory for host compilations.
This can be a string, which only applies to $host_os-$host_cpu.
Or it can be a list of scopes containing
`cpu`
,
`os`
, and
`sysroot`
.
The empty list (or empty string) means don't use
`--sysroot`
at all.
**Current value (from the default):**
```
[{
cpu = "arm64"
os = "linux"
sysroot = "//prebuilt/downloads/sysroot/linux-arm64"
}, {
cpu = "x64"
os = "linux"
sysroot = "//prebuilt/downloads/sysroot/linux-x64"
}]
```
From //public/gn/config/BUILD.gn:17
### clang_tool_dir
Directory where the Clang toolchain binaries ("clang", "llvm-nm", etc.) are
found. If this is "", then the behavior depends on $use_prebuilt_clang.
This toolchain is expected to support both Fuchsia targets and the host.
**Current value (from the default):**
`""`
From //public/gn/toolchain/clang.gni:14
### current_cpu
**Current value (from the default):**
`""`
### default_deps
Defines the
`//:default`
target: what
`ninja`
with no arguments does.
**Current value (from the default):**
`[":build-tests", ":ids", ":images", ":tools"]`
From //BUILD.gn:19
### malloc
**Current value (from the default):**
`"scudo"`
From //third_party/ulib/musl/BUILD.gn:6
### symbol_level
*
0 means no debugging information.
*
1 means minimal debugging information sufficient to symbolize backtraces.
*
2 means full debugging information for use with a symbolic debugger.
**Current value (from the default):**
`
2
`
**Current value (from the default):**
`
8
`
From //public/gn/config/l
evels.gni:20
From //public/gn/config/l
to/BUILD.gn:19
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment