Invoke queryview from the bootstrap Ninja file.

It used to be invoked from out/soong/build.ninja, which required two
soong_build invocations one after the other (ne to generate
out/soong/build.ninja, one to generate the queryview workspace). This
was slower and required some shell-quoted-in-ninja-quoted-in-Go .

Test: Presubmits.
Change-Id: Idda79c067606663b66e9f94626fa24f3b5af4114
diff --git a/ui/build/config.go b/ui/build/config.go
index 0b93b18..2cd7d55 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -49,6 +49,7 @@
 	dist            bool
 	jsonModuleGraph bool
 	bp2build        bool
+	queryview       bool
 	skipConfig      bool
 	skipKati        bool
 	skipKatiNinja   bool
@@ -643,6 +644,8 @@
 			c.jsonModuleGraph = true
 		} else if arg == "bp2build" {
 			c.bp2build = true
+		} else if arg == "queryview" {
+			c.queryview = true
 		} else {
 			if arg == "checkbuild" {
 				c.checkbuild = true
@@ -720,7 +723,7 @@
 		return true
 	}
 
-	if !c.JsonModuleGraph() && !c.Bp2Build() {
+	if !c.JsonModuleGraph() && !c.Bp2Build() && !c.Queryview() {
 		// Command line was empty, the default Ninja target is built
 		return true
 	}
@@ -785,6 +788,10 @@
 	return shared.JoinPath(c.SoongOutDir(), ".bootstrap/bp2build_workspace_marker")
 }
 
+func (c *configImpl) QueryviewMarkerFile() string {
+	return shared.JoinPath(c.SoongOutDir(), "queryview.marker")
+}
+
 func (c *configImpl) ModuleGraphFile() string {
 	return shared.JoinPath(c.SoongOutDir(), "module-graph.json")
 }
@@ -822,6 +829,10 @@
 	return c.bp2build
 }
 
+func (c *configImpl) Queryview() bool {
+	return c.queryview
+}
+
 func (c *configImpl) IsVerbose() bool {
 	return c.verbose
 }