-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
always produce .a files at the beginning of a build #3385
Changes from 19 commits
d6cb38c
784c1c0
dc93dfb
36c5314
04c752c
b81c415
8421750
c45ec9c
106e275
c3b34ad
7a79e59
de594a0
78a8e2e
2b05009
0d37f96
f0e29ba
3a35f5b
f757ef4
24e601f
b252e0e
3b8dab0
490ec4b
0d3250c
25e52fd
06fd767
1b41059
1c8389c
bb7eed4
6f3008a
06ee92d
b3dfe4b
de75424
80235ea
929b55c
87f47ef
c12a10b
108915e
bc8eb25
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,13 +44,29 @@ def _stdlib_library_to_source(go, attr, source, merge): | |
source["stdlib"] = _build_stdlib(go) | ||
|
||
def _should_use_sdk_stdlib(go): | ||
return (go.mode.goos == go.sdk.goos and | ||
return (_has_precompiled_stdlib(go.sdk.version) and | ||
go.mode.goos == go.sdk.goos and | ||
go.mode.goarch == go.sdk.goarch and | ||
not go.mode.race and # TODO(jayconrod): use precompiled race | ||
not go.mode.msan and | ||
not go.mode.pure and | ||
go.mode.link == LINKMODE_NORMAL) | ||
|
||
def _has_precompiled_stdlib(version_string): | ||
if version_string[:2] != "1.": | ||
return False | ||
minor = version_string[2:] | ||
dot = minor.find(".") | ||
if dot != -1: | ||
minor = minor[:dot] | ||
rc = minor.find("rc") | ||
if rc != -1: | ||
minor = minor[:rc] | ||
beta = minor.find("beta") | ||
if beta != -1: | ||
minor = minor[:beta] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assuming there could be other strings (e.g. "alpha"), and we are already at three (".", "rc", "beta"), could we instead cut off the first non-numeric character? You could use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think the coverage test is the same issue on the boringcrypto cl: that we need to make the path to "Tool" relative on 1.19+. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ran it locally with extra output and it complained about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, got it, that will require a closer look... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok so that error was due to the flag-flip setting the GOEXPERIMENT coverageredesign by default. We'll need to eventually update the way coverage works in rules_go, but for now we can set GOEXPERIMENT=nocoverageredesign. I'll try to find a way to set that to get this change moving forward. It might be easiest to plumb something through the same way we do in the boringcrypto cl |
||
return int(minor) < 20 | ||
|
||
def _build_stdlib_list_json(go): | ||
out = go.declare_file(go, "stdlib.pkg.json") | ||
args = go.builder_args(go, "stdliblist") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead check the existence of
go.sdk.libs
? So people can download a pre-compile Go SDK even after 1.20 to avoid building it on every machineThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!