Add overrides to cc_binary
Test: use it for healthd, it is not installed. Bug: 77541952 Change-Id: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447 Merged-In: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
This commit is contained in:
@@ -111,6 +111,7 @@ func init() {
|
|||||||
"LOCAL_CONLYFLAGS": "conlyflags",
|
"LOCAL_CONLYFLAGS": "conlyflags",
|
||||||
"LOCAL_CPPFLAGS": "cppflags",
|
"LOCAL_CPPFLAGS": "cppflags",
|
||||||
"LOCAL_REQUIRED_MODULES": "required",
|
"LOCAL_REQUIRED_MODULES": "required",
|
||||||
|
"LOCAL_OVERRIDES_MODULES": "overrides",
|
||||||
"LOCAL_LDLIBS": "host_ldlibs",
|
"LOCAL_LDLIBS": "host_ldlibs",
|
||||||
"LOCAL_CLANG_CFLAGS": "clang_cflags",
|
"LOCAL_CLANG_CFLAGS": "clang_cflags",
|
||||||
"LOCAL_YACCFLAGS": "yaccflags",
|
"LOCAL_YACCFLAGS": "yaccflags",
|
||||||
|
@@ -228,6 +228,10 @@ func (binary *binaryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.Andr
|
|||||||
if binary.coverageOutputFile.Valid() {
|
if binary.coverageOutputFile.Valid() {
|
||||||
fmt.Fprintln(w, "LOCAL_PREBUILT_COVERAGE_ARCHIVE :=", binary.coverageOutputFile.String())
|
fmt.Fprintln(w, "LOCAL_PREBUILT_COVERAGE_ARCHIVE :=", binary.coverageOutputFile.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(binary.Properties.Overrides) > 0 {
|
||||||
|
fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES := "+strings.Join(binary.Properties.Overrides, " "))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,6 +45,13 @@ type BinaryLinkerProperties struct {
|
|||||||
No_pie *bool `android:"arch_variant"`
|
No_pie *bool `android:"arch_variant"`
|
||||||
|
|
||||||
DynamicLinker string `blueprint:"mutated"`
|
DynamicLinker string `blueprint:"mutated"`
|
||||||
|
|
||||||
|
// Names of modules to be overridden. Listed modules can only be other binaries
|
||||||
|
// (in Make or Soong).
|
||||||
|
// This does not completely prevent installation of the overridden binaries, but if both
|
||||||
|
// binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
|
||||||
|
// from PRODUCT_PACKAGES.
|
||||||
|
Overrides []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Reference in New Issue
Block a user