Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
// Copyright 2017 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
package build
|
|
|
|
|
|
|
|
import (
|
2017-07-14 20:29:29 +02:00
|
|
|
"bytes"
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
"fmt"
|
2019-10-04 01:45:58 +02:00
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
"strings"
|
Add a unified status reporting UI
This adds a new status package that merges the running of "actions"
(ninja calls them edges) of multiple tools into one view of the current
state, and gives that to a number of different outputs.
For inputs:
Kati's output parser has been rewritten (and moved) to map onto the
StartAction/FinishAction API. A byproduct of this is that the build
servers should be able to extract errors from Kati better, since they
look like the errors that Ninja used to write.
Ninja is no longer directly connected to the terminal, but its output is
read via the protobuf frontend API, so it's just another tool whose
output becomes merged together.
multiproduct_kati loses its custom status routines, and uses the common
one instead.
For outputs:
The primary output is the ui/terminal.Status type, which along with
ui/terminal.Writer now controls everything about the terminal output.
Today, this doesn't really change any behaviors, but having all terminal
output going through here allows a more complicated (multi-line / full
window) status display in the future.
The tracer acts as an output of the status package, tracing all the
action start / finish events. This replaces reading the .ninja_log file,
so it now properly handles multiple output files from a single action.
A new rotated log file (out/error.log, or out/dist/logs/error.log) just
contains a description of all of the errors that happened during the
current build.
Another new compressed and rotated log file (out/verbose.log.gz, or
out/dist/logs/verbose.log.gz) contains the full verbose (showcommands)
log of every execution run by the build. Since this is now written on
every build, the showcommands argument is now ignored -- if you want to
get the commands run, look at the log file after the build.
Test: m
Test: <built-in tests>
Test: NINJA_ARGS="-t list" m
Test: check the build.trace.gz
Test: check the new log files
Change-Id: If1d8994890d43ef68f65aa10ddd8e6e06dc7013a
2018-05-18 01:37:09 +02:00
|
|
|
|
2018-12-13 01:01:49 +01:00
|
|
|
"android/soong/ui/metrics"
|
Add a unified status reporting UI
This adds a new status package that merges the running of "actions"
(ninja calls them edges) of multiple tools into one view of the current
state, and gives that to a number of different outputs.
For inputs:
Kati's output parser has been rewritten (and moved) to map onto the
StartAction/FinishAction API. A byproduct of this is that the build
servers should be able to extract errors from Kati better, since they
look like the errors that Ninja used to write.
Ninja is no longer directly connected to the terminal, but its output is
read via the protobuf frontend API, so it's just another tool whose
output becomes merged together.
multiproduct_kati loses its custom status routines, and uses the common
one instead.
For outputs:
The primary output is the ui/terminal.Status type, which along with
ui/terminal.Writer now controls everything about the terminal output.
Today, this doesn't really change any behaviors, but having all terminal
output going through here allows a more complicated (multi-line / full
window) status display in the future.
The tracer acts as an output of the status package, tracing all the
action start / finish events. This replaces reading the .ninja_log file,
so it now properly handles multiple output files from a single action.
A new rotated log file (out/error.log, or out/dist/logs/error.log) just
contains a description of all of the errors that happened during the
current build.
Another new compressed and rotated log file (out/verbose.log.gz, or
out/dist/logs/verbose.log.gz) contains the full verbose (showcommands)
log of every execution run by the build. Since this is now written on
every build, the showcommands argument is now ignored -- if you want to
get the commands run, look at the log file after the build.
Test: m
Test: <built-in tests>
Test: NINJA_ARGS="-t list" m
Test: check the build.trace.gz
Test: check the new log files
Change-Id: If1d8994890d43ef68f65aa10ddd8e6e06dc7013a
2018-05-18 01:37:09 +02:00
|
|
|
"android/soong/ui/status"
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// DumpMakeVars can be used to extract the values of Make variables after the
|
|
|
|
// product configurations are loaded. This is roughly equivalent to the
|
|
|
|
// `get_build_var` bash function.
|
|
|
|
//
|
|
|
|
// goals can be used to set MAKECMDGOALS, which emulates passing arguments to
|
|
|
|
// Make without actually building them. So all the variables based on
|
|
|
|
// MAKECMDGOALS can be read.
|
|
|
|
//
|
|
|
|
// vars is the list of variables to read. The values will be put in the
|
|
|
|
// returned map.
|
2018-10-21 18:20:47 +02:00
|
|
|
//
|
|
|
|
// variables controlled by soong_ui directly are now returned without needing
|
|
|
|
// to call into make, to retain compatibility.
|
2017-07-14 02:24:44 +02:00
|
|
|
func DumpMakeVars(ctx Context, config Config, goals, vars []string) (map[string]string, error) {
|
2018-10-21 18:20:47 +02:00
|
|
|
soongUiVars := map[string]func() string{
|
|
|
|
"OUT_DIR": func() string { return config.OutDir() },
|
|
|
|
"DIST_DIR": func() string { return config.DistDir() },
|
2019-10-08 00:26:26 +02:00
|
|
|
"TMPDIR": func() string { return absPath(ctx, config.TempDir()) },
|
2018-10-21 18:20:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
makeVars := make([]string, 0, len(vars))
|
|
|
|
for _, v := range vars {
|
|
|
|
if _, ok := soongUiVars[v]; !ok {
|
|
|
|
makeVars = append(makeVars, v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var ret map[string]string
|
|
|
|
if len(makeVars) > 0 {
|
2019-10-04 01:45:58 +02:00
|
|
|
tmpDir, err := ioutil.TempDir("", "dumpvars")
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
defer os.RemoveAll(tmpDir)
|
|
|
|
|
|
|
|
// It's not safe to use the same TMPDIR as the build, as that can be removed.
|
|
|
|
config.Environment().Set("TMPDIR", tmpDir)
|
|
|
|
|
|
|
|
SetupLitePath(ctx, config)
|
|
|
|
|
2018-10-21 18:20:47 +02:00
|
|
|
ret, err = dumpMakeVars(ctx, config, goals, makeVars, false)
|
|
|
|
if err != nil {
|
|
|
|
return ret, err
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ret = make(map[string]string)
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, v := range vars {
|
|
|
|
if f, ok := soongUiVars[v]; ok {
|
|
|
|
ret[v] = f()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret, nil
|
2017-07-14 02:24:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func dumpMakeVars(ctx Context, config Config, goals, vars []string, write_soong_vars bool) (map[string]string, error) {
|
2018-12-13 01:01:49 +01:00
|
|
|
ctx.BeginTrace(metrics.RunKati, "dumpvars")
|
2016-08-22 00:17:17 +02:00
|
|
|
defer ctx.EndTrace()
|
|
|
|
|
2017-07-14 02:24:44 +02:00
|
|
|
cmd := Command(ctx, config, "dumpvars",
|
|
|
|
config.PrebuiltBuildTool("ckati"),
|
|
|
|
"-f", "build/make/core/config.mk",
|
|
|
|
"--color_warnings",
|
2018-01-09 11:09:52 +01:00
|
|
|
"--kati_stats",
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
"dump-many-vars",
|
2017-07-14 02:24:44 +02:00
|
|
|
"MAKECMDGOALS="+strings.Join(goals, " "))
|
|
|
|
cmd.Environment.Set("CALLED_FROM_SETUP", "true")
|
|
|
|
if write_soong_vars {
|
|
|
|
cmd.Environment.Set("WRITE_SOONG_VARIABLES", "true")
|
|
|
|
}
|
|
|
|
cmd.Environment.Set("DUMP_MANY_VARS", strings.Join(vars, " "))
|
|
|
|
cmd.Sandbox = dumpvarsSandbox
|
2018-01-09 11:09:52 +01:00
|
|
|
output := bytes.Buffer{}
|
|
|
|
cmd.Stdout = &output
|
|
|
|
pipe, err := cmd.StderrPipe()
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
if err != nil {
|
2018-01-09 11:09:52 +01:00
|
|
|
ctx.Fatalln("Error getting output pipe for ckati:", err)
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
}
|
2018-01-09 11:09:52 +01:00
|
|
|
cmd.StartOrFatal()
|
|
|
|
// TODO: error out when Stderr contains any content
|
Add a unified status reporting UI
This adds a new status package that merges the running of "actions"
(ninja calls them edges) of multiple tools into one view of the current
state, and gives that to a number of different outputs.
For inputs:
Kati's output parser has been rewritten (and moved) to map onto the
StartAction/FinishAction API. A byproduct of this is that the build
servers should be able to extract errors from Kati better, since they
look like the errors that Ninja used to write.
Ninja is no longer directly connected to the terminal, but its output is
read via the protobuf frontend API, so it's just another tool whose
output becomes merged together.
multiproduct_kati loses its custom status routines, and uses the common
one instead.
For outputs:
The primary output is the ui/terminal.Status type, which along with
ui/terminal.Writer now controls everything about the terminal output.
Today, this doesn't really change any behaviors, but having all terminal
output going through here allows a more complicated (multi-line / full
window) status display in the future.
The tracer acts as an output of the status package, tracing all the
action start / finish events. This replaces reading the .ninja_log file,
so it now properly handles multiple output files from a single action.
A new rotated log file (out/error.log, or out/dist/logs/error.log) just
contains a description of all of the errors that happened during the
current build.
Another new compressed and rotated log file (out/verbose.log.gz, or
out/dist/logs/verbose.log.gz) contains the full verbose (showcommands)
log of every execution run by the build. Since this is now written on
every build, the showcommands argument is now ignored -- if you want to
get the commands run, look at the log file after the build.
Test: m
Test: <built-in tests>
Test: NINJA_ARGS="-t list" m
Test: check the build.trace.gz
Test: check the new log files
Change-Id: If1d8994890d43ef68f65aa10ddd8e6e06dc7013a
2018-05-18 01:37:09 +02:00
|
|
|
status.KatiReader(ctx.Status.StartTool(), pipe)
|
2018-01-09 11:09:52 +01:00
|
|
|
cmd.WaitOrFatal()
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
|
|
|
|
ret := make(map[string]string, len(vars))
|
2018-01-09 11:09:52 +01:00
|
|
|
for _, line := range strings.Split(output.String(), "\n") {
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
if len(line) == 0 {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
if key, value, ok := decodeKeyValue(line); ok {
|
|
|
|
if value, ok = singleUnquote(value); ok {
|
|
|
|
ret[key] = value
|
|
|
|
ctx.Verboseln(key, value)
|
|
|
|
} else {
|
|
|
|
return nil, fmt.Errorf("Failed to parse make line: %q", line)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return nil, fmt.Errorf("Failed to parse make line: %q", line)
|
|
|
|
}
|
|
|
|
}
|
2018-12-13 01:01:49 +01:00
|
|
|
if ctx.Metrics != nil {
|
|
|
|
ctx.Metrics.SetMetadataMetrics(ret)
|
|
|
|
}
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
|
|
|
|
return ret, nil
|
|
|
|
}
|
|
|
|
|
2017-07-14 20:29:29 +02:00
|
|
|
// Variables to print out in the top banner
|
|
|
|
var BannerVars = []string{
|
|
|
|
"PLATFORM_VERSION_CODENAME",
|
|
|
|
"PLATFORM_VERSION",
|
|
|
|
"TARGET_PRODUCT",
|
|
|
|
"TARGET_BUILD_VARIANT",
|
|
|
|
"TARGET_BUILD_TYPE",
|
|
|
|
"TARGET_BUILD_APPS",
|
|
|
|
"TARGET_ARCH",
|
|
|
|
"TARGET_ARCH_VARIANT",
|
|
|
|
"TARGET_CPU_VARIANT",
|
|
|
|
"TARGET_2ND_ARCH",
|
|
|
|
"TARGET_2ND_ARCH_VARIANT",
|
|
|
|
"TARGET_2ND_CPU_VARIANT",
|
|
|
|
"HOST_ARCH",
|
|
|
|
"HOST_2ND_ARCH",
|
|
|
|
"HOST_OS",
|
|
|
|
"HOST_OS_EXTRA",
|
|
|
|
"HOST_CROSS_OS",
|
|
|
|
"HOST_CROSS_ARCH",
|
|
|
|
"HOST_CROSS_2ND_ARCH",
|
|
|
|
"HOST_BUILD_TYPE",
|
|
|
|
"BUILD_ID",
|
|
|
|
"OUT_DIR",
|
|
|
|
"AUX_OS_VARIANT_LIST",
|
|
|
|
"TARGET_BUILD_PDK",
|
|
|
|
"PDK_FUSION_PLATFORM_ZIP",
|
2017-11-30 01:47:17 +01:00
|
|
|
"PRODUCT_SOONG_NAMESPACES",
|
2017-07-14 20:29:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func Banner(make_vars map[string]string) string {
|
|
|
|
b := &bytes.Buffer{}
|
|
|
|
|
|
|
|
fmt.Fprintln(b, "============================================")
|
|
|
|
for _, name := range BannerVars {
|
|
|
|
if make_vars[name] != "" {
|
|
|
|
fmt.Fprintf(b, "%s=%s\n", name, make_vars[name])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fmt.Fprint(b, "============================================")
|
|
|
|
|
|
|
|
return b.String()
|
|
|
|
}
|
|
|
|
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
func runMakeProductConfig(ctx Context, config Config) {
|
|
|
|
// Variables to export into the environment of Kati/Ninja
|
|
|
|
exportEnvVars := []string{
|
|
|
|
// So that we can use the correct TARGET_PRODUCT if it's been
|
2019-07-30 00:14:11 +02:00
|
|
|
// modified by a buildspec.mk
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
"TARGET_PRODUCT",
|
2017-05-13 04:28:13 +02:00
|
|
|
"TARGET_BUILD_VARIANT",
|
2017-05-26 07:18:57 +02:00
|
|
|
"TARGET_BUILD_APPS",
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
|
|
|
|
// compiler wrappers set up by make
|
|
|
|
"CC_WRAPPER",
|
|
|
|
"CXX_WRAPPER",
|
2017-04-05 04:05:31 +02:00
|
|
|
"JAVAC_WRAPPER",
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
|
|
|
|
// ccache settings
|
|
|
|
"CCACHE_COMPILERCHECK",
|
|
|
|
"CCACHE_SLOPPINESS",
|
|
|
|
"CCACHE_BASEDIR",
|
|
|
|
"CCACHE_CPP2",
|
|
|
|
}
|
|
|
|
|
|
|
|
allVars := append(append([]string{
|
|
|
|
// Used to execute Kati and Ninja
|
|
|
|
"NINJA_GOALS",
|
|
|
|
"KATI_GOALS",
|
2017-05-13 04:28:13 +02:00
|
|
|
|
|
|
|
// To find target/product/<DEVICE>
|
|
|
|
"TARGET_DEVICE",
|
2018-04-05 07:25:56 +02:00
|
|
|
|
2018-05-02 09:06:28 +02:00
|
|
|
// So that later Kati runs can find BoardConfig.mk faster
|
|
|
|
"TARGET_DEVICE_DIR",
|
|
|
|
|
2018-04-05 07:25:56 +02:00
|
|
|
// Whether --werror_overriding_commands will work
|
|
|
|
"BUILD_BROKEN_DUP_RULES",
|
2018-06-21 19:12:53 +02:00
|
|
|
|
2019-04-09 19:22:43 +02:00
|
|
|
// Whether to enable the network during the build
|
|
|
|
"BUILD_BROKEN_USES_NETWORK",
|
|
|
|
|
2018-06-21 19:12:53 +02:00
|
|
|
// Not used, but useful to be in the soong.log
|
2019-03-07 18:27:27 +01:00
|
|
|
"BOARD_VNDK_VERSION",
|
2019-04-17 23:44:33 +02:00
|
|
|
|
|
|
|
"DEFAULT_WARNING_BUILD_MODULE_TYPES",
|
|
|
|
"DEFAULT_ERROR_BUILD_MODULE_TYPES",
|
2019-09-20 20:37:30 +02:00
|
|
|
"BUILD_BROKEN_PREBUILT_ELF_FILES",
|
2019-10-11 07:55:33 +02:00
|
|
|
"BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW",
|
2019-04-17 23:44:33 +02:00
|
|
|
"BUILD_BROKEN_USES_BUILD_AUX_EXECUTABLE",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_AUX_STATIC_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_COPY_HEADERS",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_EXECUTABLE",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_FUZZ_TEST",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HEADER_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_DALVIK_JAVA_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_EXECUTABLE",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_FUZZ_TEST",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_JAVA_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_NATIVE_TEST",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_PREBUILT",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_SHARED_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_STATIC_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_STATIC_TEST_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_HOST_TEST_CONFIG",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_JAVA_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_MULTI_PREBUILT",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_NATIVE_BENCHMARK",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_NATIVE_TEST",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_NOTICE_FILE",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_PACKAGE",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_PHONY_PACKAGE",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_PREBUILT",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_RRO_PACKAGE",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_SHARED_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_STATIC_JAVA_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_STATIC_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_STATIC_TEST_LIBRARY",
|
|
|
|
"BUILD_BROKEN_USES_BUILD_TARGET_TEST_CONFIG",
|
2017-07-14 20:29:29 +02:00
|
|
|
}, exportEnvVars...), BannerVars...)
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
|
2017-07-14 02:24:44 +02:00
|
|
|
make_vars, err := dumpMakeVars(ctx, config, config.Arguments(), allVars, true)
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
if err != nil {
|
|
|
|
ctx.Fatalln("Error dumping make vars:", err)
|
|
|
|
}
|
|
|
|
|
2019-01-23 18:52:57 +01:00
|
|
|
env := config.Environment()
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
// Print the banner like make does
|
2019-01-23 18:52:57 +01:00
|
|
|
if !env.IsEnvTrue("ANDROID_QUIET_BUILD") {
|
2019-06-09 06:48:58 +02:00
|
|
|
fmt.Fprintln(ctx.Writer, Banner(make_vars))
|
2019-01-23 18:52:57 +01:00
|
|
|
}
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
|
|
|
|
// Populate the environment
|
|
|
|
for _, name := range exportEnvVars {
|
|
|
|
if make_vars[name] == "" {
|
|
|
|
env.Unset(name)
|
|
|
|
} else {
|
|
|
|
env.Set(name, make_vars[name])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
config.SetKatiArgs(strings.Fields(make_vars["KATI_GOALS"]))
|
|
|
|
config.SetNinjaArgs(strings.Fields(make_vars["NINJA_GOALS"]))
|
2017-05-13 04:28:13 +02:00
|
|
|
config.SetTargetDevice(make_vars["TARGET_DEVICE"])
|
2018-05-02 09:06:28 +02:00
|
|
|
config.SetTargetDeviceDir(make_vars["TARGET_DEVICE_DIR"])
|
2018-04-05 07:25:56 +02:00
|
|
|
|
2018-06-16 06:54:47 +02:00
|
|
|
config.SetPdkBuild(make_vars["TARGET_BUILD_PDK"] == "true")
|
2018-06-22 22:18:06 +02:00
|
|
|
config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] == "true")
|
2019-04-09 19:22:43 +02:00
|
|
|
config.SetBuildBrokenUsesNetwork(make_vars["BUILD_BROKEN_USES_NETWORK"] == "true")
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 00:17:17 +02:00
|
|
|
}
|