dev.boringcrypto: documentation related to Bazel #43117
Labels
Documentation
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Hello folks,
Apologies for not sticking to the template, but this is just a question and a kind request for some documentation updates.
I have a couple of questions related to the Bazel build when using dev.boringcrypto.
https://github.com/golang/go/tree/dev.boringcrypto/misc/boring#building-from-bazel
Here is the snippet:
Building from Bazel
Starting from bazelbuild/rules_go tag 0.7.1, simply download the BoringCrypto-enabled Go SDK using
go_download_sdk()
before callinggo_register_toolchains()
.For example, to use Go 1.9.3 with BoringCrypto on Linux, use the following lines in
WORKSPACE
:Note: you must not enable
pure
mode, since cgo must be enabled. To ensure that binaries are linked with BoringCrypto, you can setpure = "off"
on all relevantgo_binary
rules.Now that I have refreshed your cache, let me present the questions:
If auto, pure mode is enabled when no C/C++ toolchain is configured or when cross-compiling
. It is also suggested to control this on the command line--@io_bazel_rules_go//go/config:pure
, where its default value isfalse
. I just wanted someone to confirm that if nothing is done explicitly, it will be default to the first case and be set toauto
, therefore rely on the C/C++ toolchain or cross-compilation.cgo=True
in every go_binary and go_library or having this only in the main package's is sufficient?Overall, I would love if someone could elaborate on the Bazel build process when consuming dev.boringcrypto and I personally feel like having a FAQ would greatly benefit the community.
The text was updated successfully, but these errors were encountered: