Skip to content

cmd/go: add error for cross-compiled -race builds #38670

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

Closed
wants to merge 1 commit into from
Closed

cmd/go: add error for cross-compiled -race builds #38670

wants to merge 1 commit into from

Conversation

keyan
Copy link
Contributor

@keyan keyan commented Apr 26, 2020

Race builds require C dependencies, but cross-compiled cgo builds are
not always possible, so don't suggest enabling CGO in those cases.

Fixes #37021

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Apr 26, 2020
@gopherbot
Copy link
Contributor

This PR (HEAD: 87865b3) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/230202 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keyan Pishdadian:

Patch Set 1:

I'm happy to add some sort of test for this, but I couldn't manage to find if there are existing test for this path.


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 1:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

Race builds require C dependencies, but setting up cross-compiled cgo
builds is more complicated than just setting CGO_ENABLED, so don't
suggest that.

Fixes #37021
@gopherbot
Copy link
Contributor

This PR (HEAD: cbf43c1) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/230202 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Keyan Pishdadian:

Patch Set 2:

Sorry, I've rebased my commit https://github.com/keyan/go/commit/cbf43c1bbb0f209474cc323b3813cf270a2ba0a8, but I'm still trying to get the hang of gerrit.


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Abbigale Edmondson:

Patch Set 2:

thanks he found out he aint stupid


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 2: Run-TryBot+1 Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 2:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=d2fa7a84


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 2:

Patch Set 2:

thanks he found out he aint stupid

I'm not sure where this comment came from, but this is comment is not in line with our Gopher values (https://golang.org/conduct#values). We aim to be friendly and welcoming, especially to new contributors.


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 2: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@bcmills bcmills changed the title work: add error for cross-compiled -race builds cmd/go: add error for cross-compiled -race builds Apr 28, 2020
@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 2:

Patch Set 2:

Sorry, I've rebased my commit https://github.com/keyan/go/commit/cbf43c1bbb0f209474cc323b3813cf270a2ba0a8, but I'm still trying to get the hang of gerrit.

To edit the Gerrit commit message, edit the PR description and first comment on GitHub. (They're sync'd across automatically; see the bulleted list at the end of https://golang.org/doc/contribute.html#sending_a_change_github.)


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keyan Pishdadian:

Patch Set 3:

Patch Set 2:

Patch Set 2:

Sorry, I've rebased my commit https://github.com/keyan/go/commit/cbf43c1bbb0f209474cc323b3813cf270a2ba0a8, but I'm still trying to get the hang of gerrit.

To edit the Gerrit commit message, edit the PR description and first comment on GitHub. (They're sync'd across automatically; see the bulleted list at the end of https://golang.org/doc/contribute.html#sending_a_change_github.)

Gotcha, thanks Bryan. Thankfully I figured out the Gerrit workflow and will use it directly for future CLs.


Please don’t reply on this GitHub thread. Visit golang.org/cl/230202.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/230202 has been merged.

@gopherbot gopherbot closed this Apr 30, 2020
gopherbot pushed a commit that referenced this pull request Apr 30, 2020
Race builds require C dependencies, but cross-compiled cgo builds are
not always possible, so don't suggest enabling CGO in those cases.

Fixes #37021

Change-Id: I1fd675efc9cef958a926bd63eac8e6858bc59d0a
GitHub-Last-Rev: cbf43c1
GitHub-Pull-Request: #38670
Reviewed-on: https://go-review.googlesource.com/c/go/+/230202
Reviewed-by: Bryan C. Mills <[email protected]>
@keyan keyan deleted the kp_race_cgo_warn branch April 30, 2020 04:22
xujianhai666 pushed a commit to xujianhai666/go-1 that referenced this pull request May 21, 2020
Race builds require C dependencies, but cross-compiled cgo builds are
not always possible, so don't suggest enabling CGO in those cases.

Fixes golang#37021

Change-Id: I1fd675efc9cef958a926bd63eac8e6858bc59d0a
GitHub-Last-Rev: cbf43c1
GitHub-Pull-Request: golang#38670
Reviewed-on: https://go-review.googlesource.com/c/go/+/230202
Reviewed-by: Bryan C. Mills <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmd/go: 'go build -race' with a cross-compiled GOOS should not suggest setting CGO_ENABLED
3 participants