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

Side by Side Diff: src/cmd/go/build.go

Issue 13261055: code review 13261055: cmd/go: fix missing __mingw_fprintf symbol for cgo on w... (Closed)
Patch Set: diff -r e3fb358fb3c6 https://code.google.com/p/go Created 10 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « misc/cgo/test/issue5986.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "container/heap" 9 "container/heap"
10 "errors" 10 "errors"
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 2027
2028 cgoLibGccFileOnce.Do(func() { 2028 cgoLibGccFileOnce.Do(func() {
2029 cgoLibGccFile, cgoLibGccErr = b.libgcc(p) 2029 cgoLibGccFile, cgoLibGccErr = b.libgcc(p)
2030 }) 2030 })
2031 if cgoLibGccFile == "" && cgoLibGccErr != nil { 2031 if cgoLibGccFile == "" && cgoLibGccErr != nil {
2032 return nil, nil, err 2032 return nil, nil, err
2033 } 2033 }
2034 2034
2035 var staticLibs []string 2035 var staticLibs []string
2036 if goos == "windows" { 2036 if goos == "windows" {
2037 » » // libmingw32 and libmingwex might also use libgcc, so libgcc mu st come last 2037 » » // libmingw32 and libmingwex might also use libgcc, so libgcc mu st come last,
2038 » » staticLibs = []string{"-lmingwex", "-lmingw32"} 2038 » » // and they also have some inter-dependencies, so must use linke r groups.
2039 » » staticLibs = []string{"-Wl,--start-group", "-lmingwex", "-lmingw 32", "-Wl,--end-group"}
2039 } 2040 }
2040 if cgoLibGccFile != "" { 2041 if cgoLibGccFile != "" {
2041 staticLibs = append(staticLibs, cgoLibGccFile) 2042 staticLibs = append(staticLibs, cgoLibGccFile)
2042 } 2043 }
2043 2044
2044 cflags := stringList(cgoCPPFLAGS, cgoCFLAGS) 2045 cflags := stringList(cgoCPPFLAGS, cgoCFLAGS)
2045 for _, cfile := range cfiles { 2046 for _, cfile := range cfiles {
2046 ofile := obj + cfile[:len(cfile)-1] + "o" 2047 ofile := obj + cfile[:len(cfile)-1] + "o"
2047 if err := b.gcc(p, ofile, cflags, obj+cfile); err != nil { 2048 if err := b.gcc(p, ofile, cflags, obj+cfile); err != nil {
2048 return nil, nil, err 2049 return nil, nil, err
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 func defaultSuffix() string { 2313 func defaultSuffix() string {
2313 switch runtime.GOOS { 2314 switch runtime.GOOS {
2314 case "windows": 2315 case "windows":
2315 return ".bat" 2316 return ".bat"
2316 case "plan9": 2317 case "plan9":
2317 return ".rc" 2318 return ".rc"
2318 default: 2319 default:
2319 return ".bash" 2320 return ".bash"
2320 } 2321 }
2321 } 2322 }
OLDNEW
« no previous file with comments | « misc/cgo/test/issue5986.go ('k') | no next file » | no next file with comments »

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