Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for building with boringcrypto #3391

Closed
wants to merge 3 commits into from

Conversation

matloob
Copy link
Contributor

@matloob matloob commented Dec 12, 2022

Adds an option to go_register_toolchains and the various go_*_sdk functions to specify boringcrypto = True. Doing so builds the standard library and all library/binary packages using the GOEXPERIMENT=boringcrypto environment variable setting, which switches out the crypto implementation for boringcrypto on Go 1.19+.

What type of PR is this?

Feature

What does this PR do? Why is it needed?

It adds support for building with boringcrypto, which was added in Go 1.19.

Which issues(s) does this PR fix?

Fixes #

Other notes for review

@matloob matloob requested a review from fmeum December 12, 2022 21:19
go/private/rules/sdk.bzl Outdated Show resolved Hide resolved
go/private/sdk.bzl Outdated Show resolved Hide resolved
go/private/sdk.bzl Show resolved Hide resolved
go/tools/builders/compilepkg.go Show resolved Hide resolved
@@ -130,7 +131,7 @@ func TestLib(t *testing.T) {
}

func TestTool(t *testing.T) {
err := exec.Command("Tool").Run()
err := exec.Command("." + string(filepath.Separator) + "Tool").Run()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change due to the recent security fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was changed when 1.19 was released: https://tip.golang.org/doc/go1.19#os-exec-path

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled this out into #3392.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has been merged, please rebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, ran into some difficulties so I had to force push

WORKSPACE Outdated
@@ -6,7 +6,9 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe

go_rules_dependencies()

go_register_toolchains(version = "1.18.3")
go_register_toolchains(
version = "1.19.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's bump this to 1.19.4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Adds an option to go_register_toolchains and the various go_*_sdk
functions to specify boringcrypto = True. Doing so builds the
standard library and all library/binary packages using the
GOEXPERIMENT=boringcrypto environment variable setting, which switches
out the crypto implementation for boringcrypto on Go 1.19+.
@matloob
Copy link
Contributor Author

matloob commented Dec 13, 2022

I think something got messed up here. I tried making new PRs from other branches, and they are also failing for the same reason. I suspect it has to do with the force-push...

@fmeum fmeum force-pushed the boringcrypto branch 2 times, most recently from a38b672 to ef5197d Compare December 13, 2022 18:33
@matloob
Copy link
Contributor Author

matloob commented Dec 14, 2022

Abandoned in favor of #3398.

@matloob matloob closed this Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants