summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-12-07 13:10:56 -0800
committer Colin Cross <ccross@android.com> 2023-12-08 13:51:05 -0800
commit8ff105860d20f2ccbb8d8044bf562f94100b7f6a (patch)
treeb01575cd628eb36807b7ca274de28fd6a1971e17 /rust/rust.go
parente51c6e4109e8063e54cf7d8ced1b7da7f9359c34 (diff)
Remove ConvertWithBp2build implementations
Remove the ConvertWithBp2build implementations from all the module types, along with the related code. Bug: 315353489 Test: m blueprint_tests Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go47
1 files changed, 0 insertions, 47 deletions
diff --git a/rust/rust.go b/rust/rust.go
index ddebb7599..02ec22d7e 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -18,11 +18,8 @@ import (
"fmt"
"strings"
- "android/soong/bazel"
"android/soong/bloaty"
"android/soong/testing"
- "android/soong/ui/metrics/bp2build_metrics_proto"
-
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
@@ -176,8 +173,6 @@ type Module struct {
transitiveAndroidMkSharedLibs *android.DepSet[string]
- android.BazelModuleBase
-
// Aconfig files for all transitive deps. Also exposed via TransitiveDeclarationsInfo
mergedAconfigFiles map[string]android.Paths
}
@@ -1856,48 +1851,6 @@ func (c *Module) Partition() string {
return ""
}
-func (m *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
- if ctx.ModuleType() == "rust_library_host" || ctx.ModuleType() == "rust_library" {
- libraryBp2build(ctx, m)
- } else if ctx.ModuleType() == "rust_proc_macro" {
- procMacroBp2build(ctx, m)
- } else if ctx.ModuleType() == "rust_binary_host" {
- binaryBp2build(ctx, m)
- } else if ctx.ModuleType() == "rust_protobuf_host" || ctx.ModuleType() == "rust_protobuf" {
- protoLibraryBp2build(ctx, m)
- } else if ctx.ModuleType() == "rust_ffi_static" {
- ffiStaticBp2build(ctx, m)
- } else {
- ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
- }
-}
-
-// This is a workaround by assuming the conventions that rust crate repos are structured
-// while waiting for the sandboxing work to complete.
-// TODO(b/297344471): When crate_root prop is set which enforces inputs sandboxing,
-// always use `srcs` and `compile_data` props to generate `srcs` and `compile_data` attributes
-// instead of using globs.
-func srcsAndCompileDataAttrs(ctx android.Bp2buildMutatorContext, c baseCompiler) (bazel.LabelList, bazel.LabelList) {
- var srcs bazel.LabelList
- var compileData bazel.LabelList
-
- if c.Properties.Srcs[0] == "src/lib.rs" {
- srcs = android.BazelLabelForModuleSrc(ctx, []string{"src/**/*.rs"})
- compileData = android.BazelLabelForModuleSrc(
- ctx,
- []string{
- "src/**/*.proto",
- "examples/**/*.rs",
- "**/*.md",
- },
- )
- } else {
- srcs = android.BazelLabelForModuleSrc(ctx, c.Properties.Srcs)
- }
-
- return srcs, compileData
-}
-
var Bool = proptools.Bool
var BoolDefault = proptools.BoolDefault
var String = proptools.String