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

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

Issue 65890043: code review 65890043: cmd/go: skip writing dwarf debug info for ephemeral binaries (Closed)
Patch Set: diff -r 1b09c63ca02a https://code.google.com/p/go/ Created 10 years, 1 month 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 | « no previous file | src/cmd/go/pkg.go » ('j') | 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 "bufio" 8 "bufio"
9 "bytes" 9 "bytes"
10 "container/heap" 10 "container/heap"
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 } 1707 }
1708 } 1708 }
1709 if a.p != nil && len(a.p.CXXFiles) > 0 { 1709 if a.p != nil && len(a.p.CXXFiles) > 0 {
1710 cxx = true 1710 cxx = true
1711 } 1711 }
1712 } 1712 }
1713 ldflags := buildLdflags 1713 ldflags := buildLdflags
1714 if buildContext.InstallSuffix != "" { 1714 if buildContext.InstallSuffix != "" {
1715 ldflags = append(ldflags, "-installsuffix", buildContext.Install Suffix) 1715 ldflags = append(ldflags, "-installsuffix", buildContext.Install Suffix)
1716 } 1716 }
1717 if p.omitDWARF {
1718 ldflags = append(ldflags, "-w")
1719 }
1720
1717 // If the user has not specified the -extld option, then specify the 1721 // If the user has not specified the -extld option, then specify the
1718 // appropriate linker. In case of C++ code, use the compiler named 1722 // appropriate linker. In case of C++ code, use the compiler named
1719 // by the CXX environment variable or defaultCXX if CXX is not set. 1723 // by the CXX environment variable or defaultCXX if CXX is not set.
1720 // Else, use the CC environment variable and defaultCC as fallback. 1724 // Else, use the CC environment variable and defaultCC as fallback.
1721 extld := false 1725 extld := false
1722 for _, f := range ldflags { 1726 for _, f := range ldflags {
1723 if f == "-extld" || strings.HasPrefix(f, "-extld=") { 1727 if f == "-extld" || strings.HasPrefix(f, "-extld=") {
1724 extld = true 1728 extld = true
1725 break 1729 break
1726 } 1730 }
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 func defaultSuffix() string { 2511 func defaultSuffix() string {
2508 switch runtime.GOOS { 2512 switch runtime.GOOS {
2509 case "windows": 2513 case "windows":
2510 return ".bat" 2514 return ".bat"
2511 case "plan9": 2515 case "plan9":
2512 return ".rc" 2516 return ".rc"
2513 default: 2517 default:
2514 return ".bash" 2518 return ".bash"
2515 } 2519 }
2516 } 2520 }
OLDNEW
« no previous file with comments | « no previous file | src/cmd/go/pkg.go » ('j') | no next file with comments »

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