Skip to content

Commit 0df6ca1

Browse files
committed
add docker target for windows_amd64 and update readme for cross-compiling
1 parent e6ad1d9 commit 0df6ca1

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.bazelrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ build:debug --verbose_failures
4444
build:debug -s
4545

4646
# Docker Sandbox Mode - Note all docker sandbox configs must run from a linux x86_64 host
47-
build:docker-sandbox --experimental_docker_image=suburbandad/cross-clang-10:latest
47+
build:docker-sandbox --experimental_docker_image=suburbandad/prysm-cross:latest
4848
build:docker-sandbox --spawn_strategy=docker --strategy=Javac=docker --genrule_strategy=docker
4949
build:docker-sandbox --define=EXECUTOR=remote
5050
build:docker-sandbox --experimental_docker_verbose
@@ -100,3 +100,6 @@ build:windows_amd64 --compiler=mingw-w64
100100
build:windows_amd64_debug --config=windows_amd64
101101
build:windows_amd64_debug --config=debug
102102

103+
# windows_amd64 docker sandbox build config
104+
build:windows_amd64_docker --config=windows_amd64_debug
105+
build:windows_amd64_docker --config=docker-sandbox

tools/cross-toolchain/README.md

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# WIP Multiarch Cross Compiling Toolchain
1+
# Multiarch Cross Compiling Toolchain
22

33
### Containerized Builds
44
This project declares a c++ toolchain suite with cross compilers for targeting four platforms:
@@ -11,15 +11,15 @@ The toolchain suite describes cross compilers defined in a docker container desc
1111

1212

1313
### Using Published Docker Container for Cross Compilation Targets:
14-
This is still a WIP, at the time of this writing linux_amd64, linux_arm64, and osx_amd64 are working targets.
14+
At the time of this writing linux_amd64, linux_arm64, osx_amd64, and windows_amd64 are working targets.
1515

1616
#### If your host machine is linux_amd64
1717
If you are on linux_amd64 and you have docker configured, you can simply use bazel with the docker target configs. See the table below
1818

1919
#### Otherwise run the cross compiler image
2020
1. checkout prysm, `git clone https://github.com/prysmaticlabs/prysm`
2121
2. cd prysm
22-
3. `docker run -it -v $(pwd):/workdir suburbandad/cross-clang-10:latest`
22+
3. `docker run -it -v $(pwd):/workdir suburbandad/prysm-cross:latest`
2323

2424
From here you can run builds inside the linux x86_64 container image, e.g.:
2525

@@ -28,18 +28,14 @@ From here you can run builds inside the linux x86_64 container image, e.g.:
2828
| arm64 | linux | linux_arm64 | Y | `bazel build --config=linux_arm64_docker //beacon-chain` |
2929
| x86_64 | linux | linux_amd64 | Y | `bazel build --config=linux_amd64_docker //beacon-chain` |
3030
| x86_64 | osx | osx_amd64 | Y | `bazel build --config=osx_amd64_docker //beacon-chain` |
31-
| x86_64 | windows | windows_amd64 | N | `bazel build --config=windows_amd64_docker //beacon-chain` |
31+
| x86_64 | windows | windows_amd64 | y | `bazel build --config=windows_amd64_docker //beacon-chain` |
3232

3333

3434
#### Or, if you just want to run a particular target, this is handy:
3535
For example, to build the beacon chain for linux_arm64:
36-
`docker run -it -v $(pwd):/workdir suburbandad/cross-clang-10:latest bazel build --config=linux_arm64 //beacon-chain`
36+
`docker run -it -v $(pwd):/workdir suburbandad/prysm-cross:latest bazel build --config=linux_arm64 //beacon-chain`
3737

3838

39-
Also fun, if you are on OSX can build and run a linux_amd64 beacon-chain:
40-
`docker run -it -v $(pwd):/workdir suburbandad/cross-clang-10:latest bazel run //beacon-chain`
41-
42-
43-
### Coming soon
44-
* Windows x86_64 builds
39+
Also fun, if you are on OSX or windows, you can build and run a linux_amd64 beacon-chain:
40+
`docker run -it -v $(pwd):/workdir suburbandad/prysm-cross:latest bazel run //beacon-chain`
4541

0 commit comments

Comments
 (0)