Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
50e65ab3
Commit
50e65ab3
authored
Apr 27, 2011
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder: build multiple targets in parallel
R=rsc, dfc CC=golang-dev
https://golang.org/cl/4452047
parent
a2014f10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
main.go
misc/dashboard/builder/main.go
+14
-3
No files found.
misc/dashboard/builder/main.go
View file @
50e65ab3
...
...
@@ -60,6 +60,7 @@ var (
buildRevision
=
flag
.
String
(
"rev"
,
""
,
"Build specified revision and exit"
)
buildCmd
=
flag
.
String
(
"cmd"
,
"./all.bash"
,
"Build command (specify absolute or relative to go/src/)"
)
external
=
flag
.
Bool
(
"external"
,
false
,
"Build external packages"
)
parallel
=
flag
.
Bool
(
"parallel"
,
false
,
"Build multiple targets in parallel"
)
verbose
=
flag
.
Bool
(
"v"
,
false
,
"verbose"
)
)
...
...
@@ -133,9 +134,19 @@ func main() {
continue
}
built
:=
false
for
_
,
b
:=
range
builders
{
if
b
.
build
()
{
built
=
true
if
*
parallel
{
done
:=
make
(
chan
bool
)
for
_
,
b
:=
range
builders
{
go
func
(
b
*
Builder
)
{
done
<-
b
.
build
()
}(
b
)
}
for
_
=
range
builders
{
built
=
<-
done
||
built
}
}
else
{
for
_
,
b
:=
range
builders
{
built
=
b
.
build
()
||
built
}
}
// only run benchmarks if we didn't build anything
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment