--extra_toolchains also needs to know the platform
This commit is contained in:
parent
f65969f038
commit
0944357d54
@ -22,6 +22,7 @@ tasks:
|
|||||||
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
|
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
|
||||||
- test_x86_64-linux-musl: |
|
- test_x86_64-linux-musl: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; ./build-and-file \
|
||||||
|
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo \
|
||||||
--extra_toolchains @zig_sdk//:x86_64-linux-musl_toolchain //test:hello | \
|
--extra_toolchains @zig_sdk//:x86_64-linux-musl_toolchain //test:hello | \
|
||||||
grep -q "ELF 64-bit.* x86-64.* statically linked"
|
grep -q "ELF 64-bit.* x86-64.* statically linked"
|
||||||
- test_aarch64-linux-gnu: |
|
- test_aarch64-linux-gnu: |
|
||||||
@ -30,6 +31,7 @@ tasks:
|
|||||||
grep -q "ELF 64-bit.* ARM aarch64.* dynamically linked"
|
grep -q "ELF 64-bit.* ARM aarch64.* dynamically linked"
|
||||||
- test_aarch64-linux-musl: |
|
- test_aarch64-linux-musl: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; ./build-and-file \
|
||||||
|
--platforms @io_bazel_rules_go//go/toolchain:linux_arm64_cgo \
|
||||||
--extra_toolchains @zig_sdk//:aarch64-linux-musl_toolchain //test:hello | \
|
--extra_toolchains @zig_sdk//:aarch64-linux-musl_toolchain //test:hello | \
|
||||||
grep -q "ELF 64-bit.* ARM aarch64.* statically linked"
|
grep -q "ELF 64-bit.* ARM aarch64.* statically linked"
|
||||||
- test_x86_64-macos-gnu: |
|
- test_x86_64-macos-gnu: |
|
||||||
|
@ -31,7 +31,9 @@ bazel-bin/test/gognu_/gognu: ELF 64-bit LSB executable, x86-64, version 1 (SYSV)
|
|||||||
## linux cgo + musl
|
## linux cgo + musl
|
||||||
|
|
||||||
```
|
```
|
||||||
$ bazel build --extra_toolchains @zig_sdk//:x86_64-linux-musl_toolchain //test:hello
|
$ bazel build \
|
||||||
|
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo \
|
||||||
|
--extra_toolchains @zig_sdk//:x86_64-linux-musl_toolchain //test:hello
|
||||||
...
|
...
|
||||||
$ file ../bazel-out/k8-fastbuild-ST-d17813c235ce/bin/test/hello_/hello
|
$ file ../bazel-out/k8-fastbuild-ST-d17813c235ce/bin/test/hello_/hello
|
||||||
../bazel-out/k8-fastbuild-ST-d17813c235ce/bin/test/hello_/hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=redacted, with debug_info, not stripped
|
../bazel-out/k8-fastbuild-ST-d17813c235ce/bin/test/hello_/hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=redacted, with debug_info, not stripped
|
||||||
|
Loading…
Reference in New Issue
Block a user