Add target.vendor_ramdisk.
Add exclude_srcs, exclude_static_libs, exclude_shared_libs, and cflags. Test: pass Bug: 156098440 Change-Id: I2e10e1f7145932e9bc64f72fa95d0aac776f7f63
This commit is contained in:
@@ -177,6 +177,15 @@ type BaseCompilerProperties struct {
|
||||
// build the recovery variant of the C/C++ module.
|
||||
Exclude_generated_sources []string
|
||||
}
|
||||
Vendor_ramdisk struct {
|
||||
// list of source files that should not be used to
|
||||
// build the vendor ramdisk variant of the C/C++ module.
|
||||
Exclude_srcs []string `android:"path"`
|
||||
|
||||
// List of additional cflags that should be used to build the vendor ramdisk
|
||||
// variant of the C/C++ module.
|
||||
Cflags []string
|
||||
}
|
||||
}
|
||||
|
||||
Proto struct {
|
||||
@@ -290,6 +299,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
CheckBadCompilerFlags(ctx, "asflags", compiler.Properties.Asflags)
|
||||
CheckBadCompilerFlags(ctx, "vendor.cflags", compiler.Properties.Target.Vendor.Cflags)
|
||||
CheckBadCompilerFlags(ctx, "recovery.cflags", compiler.Properties.Target.Recovery.Cflags)
|
||||
CheckBadCompilerFlags(ctx, "vendor_ramdisk.cflags", compiler.Properties.Target.Vendor_ramdisk.Cflags)
|
||||
|
||||
esc := proptools.NinjaAndShellEscapeList
|
||||
|
||||
@@ -471,6 +481,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Recovery.Cflags)...)
|
||||
}
|
||||
|
||||
if ctx.inVendorRamdisk() {
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, esc(compiler.Properties.Target.Vendor_ramdisk.Cflags)...)
|
||||
}
|
||||
|
||||
// We can enforce some rules more strictly in the code we own. strict
|
||||
// indicates if this is code that we can be stricter with. If we have
|
||||
// rules that we want to apply to *our* code (but maybe can't for
|
||||
|
Reference in New Issue
Block a user