Files
build_make/tools/rbcrun/Android.bp
Colin Cross afc2ae5c98 Fix include-what-you-use for Go modules in build/make (part 2)
Soong was incorrectly passing -I arguments to `go compile` for all
transitive dependency packages, allowing `import` statements to
reference packages that were not listed as dependencies of the
module in the Android.bp file.  This bypassed Soong's visiblity
restrictiions.

Add direct dependencies on any packages referenced by `import`
statements.

Bug: 439627342
Test: builds with transitive dependencies removed from -I flags to go compile
Change-Id: I089e5069153667714d5a61506c6ff3ebfae0a6f1
2025-08-21 11:18:27 -07:00

46 lines
1.2 KiB
Plaintext

//
// Copyright (C) 2021 The Android Open Source Project
//
// 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"],
}
blueprint_go_binary {
name: "rbcrun",
srcs: ["rbcrun/rbcrun.go"],
deps: [
"go-starlark-starlark",
"rbcrun-module",
],
}
bootstrap_go_package {
name: "rbcrun-module",
srcs: [
"host.go",
],
testSrcs: [
"host_test.go",
],
pkgPath: "rbcrun",
deps: [
"go-starlark-resolve",
"go-starlark-starlark",
"go-starlark-starlarkjson",
"go-starlark-starlarkstruct",
"go-starlark-starlarktest",
],
}