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: Iccb523f454e8db24ea00f94bc9031b97cbadf04e
31 lines
958 B
Plaintext
31 lines
958 B
Plaintext
// Copyright 2024 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"],
|
|
}
|
|
|
|
blueprint_go_binary {
|
|
name: "source_tree_size",
|
|
srcs: [
|
|
"source_tree.pb.go",
|
|
"source_tree_size.go",
|
|
],
|
|
deps: [
|
|
"golang-protobuf-proto",
|
|
"golang-protobuf-reflect-protoreflect",
|
|
"golang-protobuf-runtime-protoimpl",
|
|
],
|
|
}
|