include = [{path = "../../../.cargo/.config-local.toml", optional = true}]

[net]
# 使用系统 git 拉取依赖，可利用已配置的 git 凭证（如 gh auth、credential helper）
git-fetch-with-cli = true

[profile.release]
lto = true

[target.x86_64-unknown-none]
rustflags = [
    "-Clink-args=-no-pie",
    "-Clink-args=-znostart-stop-gc",
    "-Clink-args=-Tlinker.x",
]

# Comment out because it's specified by runner in tgoskits
# [target.aarch64-unknown-none-softfloat]
# rustflags = [
#     "-Crelocation-model=pic",
#     "-Clink-args=-pie",
#     "-Clink-args=-znostart-stop-gc",
#     "-Clink-args=-Tlinker.x",
# ]

[target.riscv64gc-unknown-none-elf]
rustflags = [
    "-Clink-args=-no-pie",
    "-Clink-args=-znostart-stop-gc",
    "-Clink-args=-Tlinker.x",
]

[target.'cfg(target_os = "none")']
runner = "cargo osrun"

[alias]
xtask = "run --bin xtask --"
