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

Issue 5797046: code review 5797046: cmd/cgo: add support for function export for gccgo. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by remyoudompheng
Modified:
13 years, 1 month ago
Reviewers:
CC:
mpimenov, rsc, iant, golang-dev
Visibility:
Public.

Description

cmd/cgo: add support for function export for gccgo. A "gccgoprefix" flag is added and used by the go tool, to mirror the -fgo-prefix flag for gccgo, whose value is required to know how to access functions from C. Trying to export Go methods or unexported Go functions will not work. Also fix go test on "main" packages. Updates issue 2313. Fixes issue 3262.

Patch Set 1 #

Patch Set 2 : diff -r 20edbffdf421 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 20edbffdf421 https://go.googlecode.com/hg/ #

Total comments: 10

Patch Set 4 : diff -r 9d54c838381c https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r ae443f313c8f https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -19 lines) Patch
M src/cmd/cgo/main.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/cgo/out.go View 1 2 3 2 chunks +82 lines, -1 line 0 comments Download
M src/cmd/go/build.go View 1 2 3 4 4 chunks +16 lines, -7 lines 0 comments Download
M src/cmd/go/pkg.go View 1 2 3 1 chunk +11 lines, -10 lines 0 comments Download
M src/cmd/go/test.go View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 12
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 1 month ago (2012-03-09 20:58:38 UTC) #1
mpimenov
in CL description: s/mathods/methods/ >> As cgo needs to work what go-prefix is used by ...
13 years, 1 month ago (2012-03-11 12:14:18 UTC) #2
remyoudompheng
Sorry, I wrote too quick, updated the description.
13 years, 1 month ago (2012-03-11 12:40:52 UTC) #3
mpimenov
Still not that slow :) s/funcctions/functions/ On Sun, Mar 11, 2012 at 3:40 PM, <remyoudompheng@gmail.com> ...
13 years, 1 month ago (2012-03-11 12:50:33 UTC) #4
rsc
Seems plausible; Ian should look too. http://codereview.appspot.com/5797046/diff/4001/src/cmd/go/build.go File src/cmd/go/build.go (right): http://codereview.appspot.com/5797046/diff/4001/src/cmd/go/build.go#newcode1308 src/cmd/go/build.go:1308: case p.Name == ...
13 years, 1 month ago (2012-03-12 19:25:44 UTC) #5
iant
http://codereview.appspot.com/5797046/diff/4001/src/cmd/cgo/out.go File src/cmd/cgo/out.go (right): http://codereview.appspot.com/5797046/diff/4001/src/cmd/cgo/out.go#newcode649 src/cmd/cgo/out.go:649: if fntype.Results.NumFields() > 0 { You should only declare ...
13 years, 1 month ago (2012-03-12 20:24:40 UTC) #6
remyoudompheng
http://codereview.appspot.com/5797046/diff/4001/src/cmd/cgo/out.go File src/cmd/cgo/out.go (right): http://codereview.appspot.com/5797046/diff/4001/src/cmd/cgo/out.go#newcode649 src/cmd/cgo/out.go:649: if fntype.Results.NumFields() > 0 { On 2012/03/12 20:24:40, iant ...
13 years, 1 month ago (2012-03-14 22:07:28 UTC) #7
remyoudompheng
Hello mpimenov@google.com, rsc@golang.org, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 1 month ago (2012-03-14 22:07:42 UTC) #8
rsc
LGTM but wait for iant
13 years, 1 month ago (2012-03-15 18:56:02 UTC) #9
iant
LGTM
13 years, 1 month ago (2012-03-15 22:21:11 UTC) #10
iant
LGTM Thanks for tackling this.
13 years, 1 month ago (2012-03-15 22:21:22 UTC) #11
remyoudompheng
13 years, 1 month ago (2012-03-15 22:50:51 UTC) #12
*** Submitted as http://code.google.com/p/go/source/detail?r=2775491d0994 ***

cmd/cgo: add support for function export for gccgo.

A "gccgoprefix" flag is added and used by the go tool,
to mirror the -fgo-prefix flag for gccgo, whose value
is required to know how to access functions from C.

Trying to export Go methods or unexported Go functions
will not work.

Also fix go test on "main" packages.

Updates issue 2313.
Fixes issue 3262.

R=mpimenov, rsc, iant
CC=golang-dev
http://codereview.appspot.com/5797046
Sign in to reply to this message.

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