Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(394)

Issue 93580043: code review 93580043: cmd/dist, cmd/go, cmd/cgo: allow $CC_FOR_TARGET and $CX...

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by Pietro Gagliardi (andlabs)
Modified:
9 years, 4 months ago
Reviewers:
CC:
golang-codereviews, gobot, iant, minux
Visibility:
Public.

Description

cmd/dist, cmd/go, cmd/cgo: allow $CC_FOR_TARGET and $CXX_FOR_TARGET to be differnet for each target Currently, building Go with a value for $CC_FOR_TARGET and $CXX_FOR_TARGET will overwrite whatever value of defaultCC and defaultCXX was previously there, causing packages to fail when attempting to compile them for a target other than the last one built for. This change changes defaultCC and defaultCXX to functions that look up a map[string]string. The keys are GOOS/GOARCH; the values are the expected value of $CC_FOR_TARGET/$CXX_FOR_TARGET. The zdefaultcc.go file is generated with the help of two new z-files in src/cmd/go that contain the maps's values: defaultccs and defaultcxxs. Each of these files consists of lines of the form d[`GOOS/GOARCH`] = `command` These are put into functions and new compiles add to the end of each file. The intention of this design is that if recompiling a target with a different $CC_FOR_TARGET, the new value will replace the old target without us having to go through the defaultccs file each time. The two new z-files are also cleaned properly. Tested on linux/amd64 with successful cross-compilation sets for linux/amd64 and windows/386.

Patch Set 1 #

Patch Set 2 : diff -r aecdc70c44ac https://code.google.com/p/go #

Patch Set 3 : diff -r aecdc70c44ac https://code.google.com/p/go #

Patch Set 4 : diff -r 77632b0a1c94 https://code.google.com/p/go #

Patch Set 5 : diff -r f39dff1bf0d4 https://code.google.com/p/go #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -15 lines) Patch
M src/cmd/cgo/gcc.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/dist/a.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/cmd/dist/build.c View 1 2 3 4 3 chunks +9 lines, -0 lines 1 comment Download
M src/cmd/dist/buildgo.c View 1 2 3 3 chunks +104 lines, -10 lines 0 comments Download
M src/cmd/go/build.go View 1 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 15
Pietro Gagliardi (andlabs)
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
9 years, 11 months ago (2014-05-24 21:54:04 UTC) #1
Pietro Gagliardi (andlabs)
Hello golang-codereviews@googlegroups.com (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 11 months ago (2014-05-25 07:10:53 UTC) #2
Pietro Gagliardi (andlabs)
On 2014/05/25 07:10:53, Pietro Gagliardi (andlabs) wrote: > Hello mailto:golang-codereviews@googlegroups.com (cc: > mailto:golang-codereviews@googlegroups.com), > > ...
9 years, 11 months ago (2014-05-25 07:11:56 UTC) #3
r
This change is too invasive to happen so close to a release. Please ping us ...
9 years, 11 months ago (2014-05-27 18:25:27 UTC) #4
gobot
R=iant@golang.org (assigned by r@golang.org)
9 years, 10 months ago (2014-06-16 20:10:27 UTC) #5
Pietro Gagliardi (andlabs)
Hello golang-codereviews@googlegroups.com, gobot@golang.org, iant@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 10 months ago (2014-06-19 13:19:33 UTC) #6
iant
There is a typo in the first line of the CL description.
9 years, 10 months ago (2014-06-19 16:49:20 UTC) #7
iant
I'm not comfortable with the idea that the result of the build depends on previous ...
9 years, 10 months ago (2014-06-19 16:57:04 UTC) #8
minux
On Thu, Jun 19, 2014 at 12:57 PM, <iant@golang.org> wrote: > I'm not comfortable with ...
9 years, 10 months ago (2014-06-19 17:20:44 UTC) #9
iant
On Thu, Jun 19, 2014 at 10:20 AM, minux <minux@golang.org> wrote: > > On Thu, ...
9 years, 10 months ago (2014-06-19 17:28:02 UTC) #10
Pietro Gagliardi (andlabs)
On 2014/06/19 17:28:02, iant wrote: > On Thu, Jun 19, 2014 at 10:20 AM, minux ...
9 years, 10 months ago (2014-06-19 17:37:24 UTC) #11
iant
On Thu, Jun 19, 2014 at 10:37 AM, <pietro10@mac.com> wrote: > On 2014/06/19 17:28:02, iant ...
9 years, 10 months ago (2014-06-19 18:02:25 UTC) #12
Pietro Gagliardi (andlabs)
On 2014/06/19 18:02:25, iant wrote: > On Thu, Jun 19, 2014 at 10:37 AM, <mailto:pietro10@mac.com> ...
9 years, 9 months ago (2014-07-05 14:03:42 UTC) #13
Pietro Gagliardi (andlabs)
I have this new setup implemented, this time on a clean go tip, so I ...
9 years, 9 months ago (2014-07-11 01:01:53 UTC) #14
gobot
9 years, 4 months ago (2014-12-19 05:19:11 UTC) #15
R=close

To the author of this CL:

The Go project has moved to Gerrit Code Review.

If this CL should be continued, please see the latest version of
https://golang.org/doc/contribute.html for instructions on
how to set up Git and the Go project's Gerrit codereview plugin,
and then create a new change with your current code.

If there has been discussion on this CL, please give a link to it
(golang.org/cl/93580043 is best) in the description in your
new CL.

Thanks very much.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b