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$ $ 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 You may explicitly request Bazel to use a specific toolchain, even though a
is registered using `--extra_toolchains <toolchain>` flag. For example, if you different one is registered using `--extra_toolchains <toolchain>` in
wish to compile a specific binary (or run tests) using musl on linux/amd64, you `.bazelrc`. For example, if you wish to compile a specific binary (or run
may specify: tests) on linux/amd64/musl, you may specify:
``` ```
--extra_toolchains @zig_sdk//:linux_amd64_musl_toolchain --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" ## UBSAN and "SIGILL: Illegal Instruction"
`zig cc` differs from "mainstream" compilers by [enabling UBSAN by `zig cc` differs from "mainstream" compilers by [enabling UBSAN by