1
Fork 0

[readme] update obsolete section

This commit is contained in:
Motiejus Jakštys 2022-02-08 14:41:35 +02:00
parent 90ceb2f896
commit 84b5fa6dc8
1 changed files with 5 additions and 15 deletions

View File

@ -63,27 +63,17 @@ used, run:
$ bazel query @zig_sdk//... | grep _toolchain$
```
## Specifying non-default toolchains (and not registering at all)
## Specifying non-default toolchains
You may explicitly request Bazel to use a specific toolchain, even though one
is registered using `--extra_toolchains <toolchain>` flag. For example, if you
wish to compile a specific binary (or run tests) using musl on linux/amd64, you
may specify:
You may explicitly request Bazel to use a specific toolchain, even though a
different one is registered using `--extra_toolchains <toolchain>` in
`.bazelrc`. For example, if you wish to compile a specific binary (or run
tests) on linux/amd64/musl, you may specify:
```
--extra_toolchains @zig_sdk//:linux_amd64_musl_toolchain
```
As an extension to this, you may not register the toolchains at all:
```
zig_register_toolchains()
```
In that case, you will need to specify the `--extra_toolchains <toolchain>`
command-line argument. Otherwise Bazel will use the default one -- the host
toolchain.
## UBSAN and "SIGILL: Illegal Instruction"
`zig cc` differs from "mainstream" compilers by [enabling UBSAN by