d1e3f1ff08
This requires linking Blueprint into soong_ui. It lets us avoid the complicated dance of Ninja files and shell scripts: now the information as to how soong_build is built is passed directly to Blueprint using a struct that contains all the information the command line arguments used to contain. The ability to run Blueprint from the command line is kept (for now). Some variables in bootstrap/command.go needed public accessor functions because soong_build reads them. This will be disentangled by moving the flag parsing to soong_build. The presence of the flag definitions in Blueprint means that soong_ui now also accepts them. This is not a problem in practice because they are ignored and because soong_ui itself is hidden behind a few layers of shell scripts. Test: Presubmits + the new bootstrap_test.sh . Change-Id: I6dca478f356f56a8aee1e457d71439272351390b
90 lines
2.1 KiB
Text
90 lines
2.1 KiB
Text
// 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 {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-ui-build-paths",
|
|
pkgPath: "android/soong/ui/build/paths",
|
|
srcs: [
|
|
"paths/config.go",
|
|
"paths/logs.go",
|
|
],
|
|
testSrcs: [
|
|
"paths/logs_test.go",
|
|
],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-ui-build",
|
|
pkgPath: "android/soong/ui/build",
|
|
deps: [
|
|
"blueprint",
|
|
"blueprint-bootstrap",
|
|
"soong-ui-build-paths",
|
|
"soong-ui-logger",
|
|
"soong-ui-metrics",
|
|
"soong-ui-status",
|
|
"soong-ui-terminal",
|
|
"soong-ui-tracer",
|
|
"soong-shared",
|
|
"soong-finder",
|
|
"blueprint-microfactory",
|
|
],
|
|
srcs: [
|
|
"bazel.go",
|
|
"build.go",
|
|
"cleanbuild.go",
|
|
"config.go",
|
|
"context.go",
|
|
"dumpvars.go",
|
|
"environment.go",
|
|
"exec.go",
|
|
"finder.go",
|
|
"goma.go",
|
|
"kati.go",
|
|
"ninja.go",
|
|
"path.go",
|
|
"proc_sync.go",
|
|
"rbe.go",
|
|
"signal.go",
|
|
"soong.go",
|
|
"test_build.go",
|
|
"upload.go",
|
|
"util.go",
|
|
],
|
|
testSrcs: [
|
|
"cleanbuild_test.go",
|
|
"config_test.go",
|
|
"environment_test.go",
|
|
"rbe_test.go",
|
|
"upload_test.go",
|
|
"util_test.go",
|
|
"proc_sync_test.go",
|
|
],
|
|
darwin: {
|
|
srcs: [
|
|
"config_darwin.go",
|
|
"sandbox_darwin.go",
|
|
],
|
|
},
|
|
linux: {
|
|
srcs: [
|
|
"config_linux.go",
|
|
"sandbox_linux.go",
|
|
],
|
|
},
|
|
}
|