Building for targets
A normal ablac build selects the host. Try this example as a native executable with ablac build targets.ab -o targets. The test runs it on the current host; that does not prove it runs on every platform.
The built-in --target names are x86_64-linux, aarch64-linux, x86_64-macos, arm64-macos and x86_64-windows. The Windows target is for freestanding programs. Cross-linking can require the target SDK and libraries. Wasm, Android and iOS targets are registered by their build libraries; they are not interchangeable built-in CLI aliases. Start with the platform's build example rather than guessing a target name. Linux programs are libc-free by default unless their dependencies require a C library; no opt-in flag is needed.
See target selection and evidence, programmable builds, Wasm, and iOS.
import "abla/io"
fun main {
println("Built for the selected host target")
}
// output:
// Built for the selected host target
Built from compiler source ba5d6b7d. Examples and generated signatures follow that source revision.