summaryrefslogtreecommitdiff
path: root/rust/compiler.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-09-23 05:19:13 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-09-23 05:19:13 +0000
commit40c7bae1df1028cc4f5545938858c16d5040442f (patch)
treee58fd7c96d37c504959ccfe41431323f2e2c0c21 /rust/compiler.go
parent4ad574cc37f23d36428d8947dd3f29bcacdb0ef4 (diff)
parent930fd8bfb1190e20789c332d3f8d7de79bcee13c (diff)
Merge changes from topics "revert-2629131-sandbox-rust-inputs-JRFPQTIPEY", "revert-2758566-WBNIADIEXA" into main
* changes: Revert^3 "add rust_toolchain_rustc_prebuilt module type" Revert^3 "add crate_root property to rust modules" Revert^3 "allow Ninja variables in RuleBuilder API" Revert "conditionally escape rule builder command" Revert "support sandboxed rust rules" Revert "fix failing rust_aconfig_library test" Revert "rustSetToolchainSource to use linux-x86 srcs" Revert "remove rust deps on clang prebuilts"
Diffstat (limited to 'rust/compiler.go')
-rw-r--r--rust/compiler.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/rust/compiler.go b/rust/compiler.go
index 3fa3ccd69..e6a7a9356 100644
--- a/rust/compiler.go
+++ b/rust/compiler.go
@@ -73,18 +73,6 @@ type BaseCompilerProperties struct {
// If no source file is defined, a single generated source module can be defined to be used as the main source.
Srcs []string `android:"path,arch_variant"`
- // Entry point that is passed to rustc to begin the compilation. E.g. main.rs or lib.rs.
- // When this property is set,
- // * sandboxing is enabled for this module, and
- // * the srcs attribute is interpreted as a list of all source files potentially
- // used in compilation, including the entrypoint, and
- // * compile_data can be used to add additional files used in compilation that
- // not directly used as source files.
- Crate_root *string `android:"path,arch_variant"`
-
- // Additional data files that are used during compilation only. These are not accessible at runtime.
- Compile_data []string `android:"path,arch_variant"`
-
// name of the lint set that should be used to validate this module.
//
// Possible values are "default" (for using a sensible set of lints
@@ -346,23 +334,6 @@ func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathD
panic(fmt.Errorf("baseCrater doesn't know how to crate things!"))
}
-func (compile *baseCompiler) crateRoot(ctx ModuleContext) android.Path {
- if compile.Properties.Crate_root != nil {
- return android.PathForModuleSrc(ctx, *compile.Properties.Crate_root)
- }
- return nil
-}
-
-// compilationSourcesAndData returns a list of files necessary to complete the compilation.
-// This includes the rust source files as well as any other data files that
-// are referenced during the build.
-func (compile *baseCompiler) compilationSourcesAndData(ctx ModuleContext) android.Paths {
- return android.PathsForModuleSrc(ctx, android.Concat(
- compile.Properties.Srcs,
- compile.Properties.Compile_data,
- ))
-}
-
func (compiler *baseCompiler) rustdoc(ctx ModuleContext, flags Flags,
deps PathDeps) android.OptionalPath {
@@ -540,8 +511,6 @@ func srcPathFromModuleSrcs(ctx ModuleContext, srcs []string) (android.Path, andr
ctx.PropertyErrorf("srcs", "only a single generated source module can be defined without a main source file.")
}
- // TODO: b/297264540 - once all modules are sandboxed, we need to select the proper
- // entry point file from Srcs rather than taking the first one
paths := android.PathsForModuleSrc(ctx, srcs)
return paths[srcIndex], paths[1:]
}