This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Initial support for build variants (e.g., LTO, sanitizers). - Build libgo deps from bootstrap script. We will need to do this for build variants. - Filter everything from libgo's make output except package names. This makes the output much easier to read.
- Loading branch information
Showing
7 changed files
with
179 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package main | ||
|
||
import ( | ||
"bufio" | ||
"io" | ||
"os" | ||
"strings" | ||
) | ||
|
||
// A simple filter program which improves the readability of libgo's build | ||
// output by filtering out everything except the package names. | ||
func main() { | ||
stdin := bufio.NewReader(os.Stdin) | ||
pkgs := make(map[string]struct{}) | ||
for { | ||
line, err := stdin.ReadString('\n') | ||
if err == io.EOF { | ||
return | ||
} else if err != nil { | ||
panic("read error: " + err.Error()) | ||
} | ||
line = line[0 : len(line)-1] | ||
if strings.HasPrefix(line, "libtool: compile:") { | ||
words := strings.Split(line, " ") | ||
for _, word := range words { | ||
if strings.HasPrefix(word, "-fgo-pkgpath=") { | ||
pkg := word[13:] | ||
if _, ok := pkgs[pkg]; !ok { | ||
os.Stdout.WriteString(pkg + "\n") | ||
pkgs[pkg] = struct{}{} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters