# 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 `config.example.toml`).
profile = 'dist'

[llvm]

# Indicates whether an LLVM Release build should include debug info
release-debuginfo = 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 = false

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

# LLVM targets to build support for.
# Note: this is NOT related to Rust compilation targets. However, as Rust is
# dependent on LLVM for code generation, turning targets off here WILL lead to
# the resulting rustc being unable to compile for the disabled architectures.
#
# To add support for new targets, see https://rustc-dev-guide.rust-lang.org/building/new-target.html.
targets = 'Mips;X86'

[build]

# Which triples to produce a compiler toolchain for. Each of these triples will be bootstrapped from
# the build triple themselves. In other words, this is the list of triples for which to build a
# compiler that can RUN on that triple.
#
# Defaults to just the `build` triple.
host = ['mipsel-unknown-netbsd']

# Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of these triples will
# be bootstrapped from the build triple themselves. In other words, this is the list of triples for
# which to build a library that can CROSS-COMPILE to that triple.
#
# Defaults to `host`. If you set this explicitly, you likely want to add all
# host triples to this list as well in order for those host toolchains to be
# able to compile programs for their native target.
target = ['mipsel-unknown-netbsd']

# Instead of downloading the src/stage0 version of Cargo specified, use
# this Cargo binary instead to build all Rust code
# If you set this, you likely want to set `rustc` as well.
cargo = '/usr/pkgsrc/wip/rust185/work/rust-bootstrap/bin/cargo'

# Instead of downloading the src/stage0 version of the compiler
# specified, use this rustc binary instead as the stage0 snapshot compiler.
# If you set this, you likely want to set `cargo` as well.
rustc = '/usr/pkgsrc/wip/rust185/work/rust-bootstrap/bin/rustc'

# Whether to build documentation by default. If false, rustdoc and
# friends will still be compiled but they will not be used to generate any
# documentation.
#
# You can still build documentation when this is disabled by explicitly passing paths,
# e.g. `x doc library`.
docs = false

# Indicate whether to build compiler documentation by default.
# You can still build documentation when this is disabled by explicitly passing a path: `x doc compiler`.
compiler-docs = false

# Python interpreter to use for various tasks throughout the build, notably
# rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
#
# Defaults to the Python interpreter used to execute x.py.
python = '/usr/pkg/bin/python3.12'

# Indicate whether the vendored sources are used for Rust dependencies or not.
#
# Vendoring requires additional setup. We recommend using the pre-generated source tarballs if you
# want to use vendoring. See https://forge.rust-lang.org/infra/other-installation-methods.html#source-code.
vendor = 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 `config.example.toml` to see its default value) option specifies
# which tools should be built if `extended = true`.
#
# This is disabled by default.
extended = 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 = ['--prefix=/usr/pkg', '--mandir=/usr/pkg/man', '--sysconfdir=/usr/pkg/etc', '--python=/usr/pkg/bin/python3.12', '--release-channel=stable', '--local-rust-root=/usr/pkgsrc/wip/rust185/work/rust-bootstrap', '--enable-extended', '--enable-rpath', '--disable-codegen-tests', '--disable-compiler-docs', '--disable-llvm-static-stdcpp', '--disable-ninja', '--dist-compression-formats=xz', '--set', 'dist.vendor=false', '--host=mipsel-unknown-netbsd', '--target=mipsel-unknown-netbsd', '--set=target.mipsel-unknown-netbsd.cc=/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap', '--set=target.mipsel-unknown-netbsd.cxx=/usr/pkgsrc/wip/rust185/work/scripts/c++-wrap', '--set=target.mipsel-unknown-netbsd.linker=/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap', '--set=target.mipsel-unknown-netbsd.ar=/u/mipsel/tools/bin/mipsel--netbsd-ar', '--enable-vendor', '--disable-debug', '--disable-debug-assertions', '--disable-llvm-release-debuginfo', '--debuginfo-level=0', '--debuginfo-level-rustc=0', '--debuginfo-level-std=0', '--debuginfo-level-tools=0', '--debuginfo-level-tests=0', '--set', 'llvm.targets=Mips;X86', '--enable-cargo-native-static', '--disable-docs']

[install]

# Where to install the generated toolchain. Must be an absolute path.
prefix = '/usr/pkg'

# Where to install system configuration files.
# If this is a relative path, it will get installed in `prefix` above
sysconfdir = '/usr/pkg/etc'

# Where to install man pages in `prefix` above
mandir = '/usr/pkg/man'

[rust]

# Indicates that the build should be configured for debugging Rust. A
# `debug`-enabled compiler and standard library will be somewhat
# slower (due to e.g. checking of debug assertions) but should remain
# usable.
#
# Note: If this value is set to `true`, it will affect a number of
#       configuration options below as well, if they have been left
#       unconfigured in this file.
#
# Note: changes to the `debug` setting do *not* affect `optimize`
#       above. In theory, a "maximally debuggable" environment would
#       set `optimize` to `false` above to assist the introspection
#       facilities of debuggers like lldb and gdb. To recreate such an
#       environment, explicitly set `optimize` to `false` and `debug`
#       to `true`. In practice, everyone leaves `optimize` set to
#       `true`, because an unoptimized rustc with debugging
#       enabled becomes *unusably slow* (e.g. rust-lang/rust#24840
#       reported a 25x slowdown) and bootstrapping the supposed
#       "maximally debuggable" environment (notably libstd) takes
#       hours to build.
#
debug = false

# Whether or not debug assertions are enabled for the compiler and standard library.
# These can help find bugs at the cost of a small runtime slowdown.
#
# Defaults to rust.debug value
debug-assertions = false

# Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
# See https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo for available options.
#
# Can be overridden for specific subsets of Rust code (rustc, std or tools).
# Debuginfo for tests run with compiletest is not controlled by this option
# and needs to be enabled separately with `debuginfo-level-tests`.
#
# Note that debuginfo-level = 2 generates several gigabytes of debuginfo
# and will slow down the linking process significantly.
debuginfo-level = 0

# Debuginfo level for the compiler.
debuginfo-level-rustc = 0

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

# Debuginfo level for the tools.
debuginfo-level-tools = 0

# Debuginfo level for the test suites run with compiletest.
# FIXME(#61117): Some tests fail when this option is enabled.
debuginfo-level-tests = 0

# 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
#
# If using tarball sources, default value for `channel` is taken from the `src/ci/channel` file;
# otherwise, it's "dev".
channel = 'stable'

# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
# platforms to ensure that the compiler is usable by default from the build
# directory (as it links to a number of dynamic libraries). This may not be
# desired in distributions, for example.
rpath = true

# Flag indicating whether codegen tests will be run or not. If you get an error
# saying that the FileCheck executable is missing, you may want to disable this.
# Also see the target's llvm-filecheck option.
codegen-tests = false

[target.x86_64-unknown-netbsd]

[target.mipsel-unknown-netbsd]

# C compiler to be used to compile C code. Note that the
# default value is platform specific, and if not specified it may also depend on
# what platform is crossing to what platform.
# See `src/bootstrap/cc_detect.rs` for details.
cc = '/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap'

# C++ compiler to be used to compile C++ code (e.g. LLVM and our LLVM shims).
# This is only used for host targets.
# See `src/bootstrap/cc_detect.rs` for details.
cxx = '/usr/pkgsrc/wip/rust185/work/scripts/c++-wrap'

# Archiver to be used to assemble static libraries compiled from C/C++ code.
# Note: an absolute path should be used, otherwise LLVM build will break.
ar = '/u/mipsel/tools/bin/mipsel--netbsd-ar'

# Linker to be used to bootstrap Rust code. Note that the
# default value is platform specific, and if not specified it may also depend on
# what platform is crossing to what platform.
# Setting this will override the `use-lld` option for Rust code when targeting MSVC.
linker = '/usr/pkgsrc/wip/rust185/work/scripts/gcc-wrap'

[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']

# Whether to vendor dependencies for the dist tarball.
vendor = false

