Default build target behaviour in 0.16.0

I have noticed a change in how zig build selects abi targets, but i’m struggling to reproduce it.

Before when i ran a build of a c project with static linking, zig would default to musl. Now however it is not, and is throwing errors on trying to statically link to gnu, my hosts default abi.

If i pass -Dtarget=native-native-musl everything works correctly, however i would like this to be automatic.

Was there a change recently and is there any way to set a default target for builds?

if using b.standardTargetOptions there is a default_target field in its options struct.

1 Like