# Use different pre-set defaults than the global defaults.
#
# See `src/bootstrap/defaults` for more information.
# Note that this has no default value (x.py uses the defaults in `bootstrap.example.toml`).
profile = 'dist'

[llvm]

# Indicates whether the LLVM assertions are enabled or not
# NOTE: When assertions are disabled, bugs in the integration between rustc and LLVM can lead to
# unsoundness (segfaults, etc.) in the rustc process itself, not just in the generated code.
assertions = false

# When true, link libstdc++ statically into the rustc_llvm.
# This is useful if you don't want to use the dynamic version of that
# library provided by LLVM.
static-libstdcpp = true

# Whether to use Ninja to build LLVM. This runs much faster than make.
ninja = false

[gcc]

[build]

# Indicate whether git submodules are managed and updated automatically.
submodules = false

# Force Cargo to check that Cargo.lock describes the precise dependency
# set that all the Cargo.toml files create, instead of updating it.
locked-deps = true

# Enable a build of the extended Rust tool set which is not only the compiler
# but also tools such as Cargo. This will also produce "combined installers"
# which are used to install Rust and Cargo together.
# The `tools` (check `bootstrap.example.toml` to see its default value) option specifies
# which tools should be built if `extended = true`.
#
# This is disabled by default.
extended = true

# Build the sanitizer runtimes
sanitizers = true

# Build the profiler runtime (required when compiling with options that depend
# on this runtime, such as `-C profile-generate` or `-C instrument-coverage`).
profiler = true

# Use the optimized LLVM C intrinsics for `compiler_builtins`, rather than Rust intrinsics.
# Requires the LLVM submodule to be managed by bootstrap (i.e. not external) so that `compiler-rt`
# sources are available.
#
# Setting this to `false` generates slower code, but removes the requirement for a C toolchain in
# order to run `x check`.
optimized-compiler-builtins = true

# Indicates whether the native libraries linked into Cargo will be statically
# linked or not.
cargo-native-static = true

# Arguments passed to the `./configure` script, used during distcheck. You
# probably won't fill this in but rather it's filled in by the `./configure`
# script. Useful for debugging.
configure-args = ['--enable-full-tools', '--enable-sanitizers', '--enable-profiler', '--set', 'rust.jemalloc', '--set', 'llvm.ninja=false', '--set', 'rust.lto=thin', '--set', 'rust.codegen-units=1', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=true', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=stable', '--enable-llvm-static-stdcpp', '--set', 'rust.remap-debuginfo', '--debuginfo-level-std=1', '--disable-llvm-assertions', '--set', 'rust.codegen-backends=llvm,cranelift']

# Print out how long each bootstrap step took (mostly intended for CI and
# tracking over time)
print-step-timings = true

# Collect information and statistics about the current build, and write it to
# disk. Enabling this has no impact on the resulting build output. The
# schema of the file generated by the build metrics feature is unstable, and
# this is not intended to be used during local development.
metrics = true

# Indicates whether ccache is used when building certain artifacts (e.g. LLVM).
# Set to `true` to use the first `ccache` in PATH, or set an absolute path to use
# a specific version.
ccache = 'sccache'

[install]

[rust]

# Number of codegen units to use for each compiler invocation. A value of 0
# means "the number of cores on this machine", and 1+ is passed through to the
# compiler.
#
# Uses the rustc defaults: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
codegen-units = 1

# Sets the number of codegen units to build the standard library with,
# regardless of what the codegen-unit setting for the rest of the compiler is.
# NOTE: building with anything other than 1 is known to occasionally have bugs.
codegen-units-std = 1

# Debuginfo level for the standard library.
debuginfo-level-std = 1

# The "channel" for the Rust build to produce. The stable/beta channels only
# allow using stable features, whereas the nightly and dev channels allow using
# nightly features.
#
# You can set the channel to "auto-detect" to load the channel name from `src/ci/channel`.
#
# If using tarball sources, default value is "auto-detect", otherwise, it's "dev".
channel = 'stable'

# Prints each test name as it is executed, to help debug issues in the test harness itself.
verbose-tests = true

# Whether to create a source tarball by default when running `x dist`.
#
# You can still build a source tarball when this is disabled by explicitly passing `x dist rustc-src`.
dist-src = false

# This is an array of the codegen backends that will be compiled for the rustc
# that's being compiled. The default is to only build the LLVM codegen backend,
# and currently the only standard options supported are `"llvm"`, `"cranelift"`
# and `"gcc"`. The first backend in this list will be used as default by rustc
# when no explicit backend is specified.
codegen-backends = ['llvm', 'cranelift']

# Indicates whether LLD will be compiled and made available in the sysroot for rustc to execute, and
# whether to set it as rustc's default linker on `x86_64-unknown-linux-gnu`. This will also only be
# when *not* building an external LLVM (so only when using `download-ci-llvm` or building LLVM from
# the in-tree source): setting `llvm-config` in the `[target.x86_64-unknown-linux-gnu]` section will
# make this default to false.
lld = true

# Indicates whether some LLVM tools, like llvm-objdump, will be made available in the
# sysroot.
llvm-tools = true

# Indicates whether the `self-contained` llvm-bitcode-linker, will be made available
# in the sysroot. It is required for running nvptx tests.
llvm-bitcode-linker = true

# Map debuginfo paths to `/rust/$sha/...`.
# Useful for reproducible builds. Generally only set for releases
remap-debuginfo = true

# Link the compiler and LLVM against `jemalloc` instead of the default libc allocator.
# This option is only tested on Linux and OSX. It can also be configured per-target in the
# [target.<tuple>] section.
jemalloc = true

# Select LTO mode that will be used for compiling rustc. By default, thin local LTO
# (LTO within a single crate) is used (like for any Rust crate). You can also select
# "thin" or "fat" to apply Thin/Fat LTO to the `rustc_driver` dylib, or "off" to disable
# LTO entirely.
lto = 'thin'

[dist]

# List of compression formats to use when generating dist tarballs. The list of
# formats is provided to rust-installer, which must support all of them.
#
# This list must be non-empty.
compression-formats = ['xz']

# How much time should be spent compressing the tarballs. The better the
# compression profile, the longer compression will take.
#
# Available options: fast, balanced, best
compression-profile = 'balanced'

[target.aarch64-apple-darwin]

