[env]
# to compile oniguruma (deps of vrl/grok/oni-rs) with gcc >= 15
# see https://github.com/rust-onig/rust-onig/issues/196
CFLAGS = '-std=gnu17'

# use an other linker for compile time speed
# see [How-to compile rust faster - Rust.Careers Rust Blog](https://blog.rust.careers/post/compile_rust_faster/)

# [target.x86_64-unknown-linux-gnu]
# linker = "clang"
# rustflags = ["-C", "link-arg=-fuse-ld=mold"]
# rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]

# workaround "NOT found x86_64-linux-musl-gcc" when compiling ring on x86_64-linux-musl with ubuntu/musl-tools
# The solution should be compatible with cargo-dist and the generated github workflow (release.yml)
[target.x86_64-unknown-linux-musl]
# CC = "musl-gcc"
linker = "musl-gcc" # vs "x86_64-linux-musl-gcc"
rustflags = ["-C", "target-feature=+crt-static"]
