summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go18
1 files changed, 13 insertions, 5 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index d0d482561..0e3c3a094 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -147,9 +147,7 @@ type FilesystemProperties struct {
Erofs ErofsProperties
- // List of files (in .json format) that will be converted to a linker config file (in .pb format).
- // The linker config file be installed in the filesystem at /etc/linker.config.pb
- Linker_config_srcs []string `android:"path"`
+ Linkerconfig LinkerConfigProperties
// Determines if the module is auto-generated from Soong or not. If the module is
// auto-generated, its deps are exempted from visibility enforcement.
@@ -168,6 +166,16 @@ type ErofsProperties struct {
Sparse *bool
}
+type LinkerConfigProperties struct {
+
+ // Build a linker.config.pb file
+ Gen_linker_config *bool
+
+ // List of files (in .json format) that will be converted to a linker config file (in .pb format).
+ // The linker config file be installed in the filesystem at /etc/linker.config.pb
+ Linker_config_srcs []string `android:"path"`
+}
+
// android_filesystem packages a set of modules and their transitive dependencies into a filesystem
// image. The filesystem images are expected to be mounted in the target device, which means the
// modules in the filesystem image are built for the target device (i.e. Android, not Linux host).
@@ -690,13 +698,13 @@ func (f *filesystem) buildEventLogtagsFile(ctx android.ModuleContext, builder *a
}
func (f *filesystem) buildLinkerConfigFile(ctx android.ModuleContext, builder *android.RuleBuilder, rebasedDir android.OutputPath) {
- if len(f.properties.Linker_config_srcs) == 0 {
+ if !proptools.Bool(f.properties.Linkerconfig.Gen_linker_config) {
return
}
provideModules, _ := f.getLibsForLinkerConfig(ctx)
output := rebasedDir.Join(ctx, "etc", "linker.config.pb")
- linkerconfig.BuildLinkerConfig(ctx, builder, android.PathsForModuleSrc(ctx, f.properties.Linker_config_srcs), provideModules, nil, output)
+ linkerconfig.BuildLinkerConfig(ctx, builder, android.PathsForModuleSrc(ctx, f.properties.Linkerconfig.Linker_config_srcs), provideModules, nil, output)
f.appendToEntry(ctx, output)
}