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

Issue 4023069: code review 4023069: cgo: don't run cgo when not compiling (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 4 months ago by niemeyer
Modified:
14 years, 3 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

cgo: don't run cgo when not compiling The logic introduced to avoid running cgo when introducing _cgo_flags is faulty. My goal was to handle it with the following statement: -include _cgo_flags The dash tells make to ignore errors if it can't include the file. What I missed, though, was the fact that it *will* attempt to build the file if it knows how. This change will introduce the originally intended semantics of not attempting to build the file before necessary.

Patch Set 1 #

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M src/Make.pkg View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6
niemeyer
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 4 months ago (2011-02-05 19:04:54 UTC) #1
rsc
A more straightforward fix would be to rename the rule (but not the file) _load_cgo_flags.
14 years, 4 months ago (2011-02-05 23:50:37 UTC) #2
niemeyer
Nice, thanks. PTAL
14 years, 4 months ago (2011-02-06 00:32:42 UTC) #3
niemeyer
ping to submit before the next release.
14 years, 4 months ago (2011-02-08 12:46:44 UTC) #4
rsc
LGTM
14 years, 4 months ago (2011-02-08 20:39:50 UTC) #5
rsc
14 years, 4 months ago (2011-02-08 20:40:19 UTC) #6
*** Submitted as 98e719cb1b04 ***

cgo: don't run cgo when not compiling

The logic introduced to avoid running cgo when
introducing _cgo_flags is faulty.  My goal was
to handle it with the following statement:

    -include _cgo_flags

The dash tells make to ignore errors if it can't
include the file.

What I missed, though, was the fact that it
*will* attempt to build the file if it knows
how.

This change will introduce the originally
intended semantics of not attempting to build
the file before necessary.

R=rsc
CC=golang-dev
http://codereview.appspot.com/4023069

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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