summaryrefslogtreecommitdiff
path: root/build/art.go
diff options
context:
space:
mode:
author Android Culprit Assistant <boq-android-culprit-assistant@system.gserviceaccount.com> 2023-05-08 20:26:03 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-05-08 20:26:03 +0000
commit429b584f59a317803ddb93d237a954c85b66dda4 (patch)
tree1ed5d9f69020b57c6f6aa6f12e3d69bd1ad81f0c /build/art.go
parent32645f219cb3d4588c1aefcf9c7db944aef6cd45 (diff)
Revert "Remove the codegen property"
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/88fe93a5-fc12-490e-8914-e81bb746b001). Change-Id: I87dc85008a9c79c017055ae641f41809d19b1c78
Diffstat (limited to 'build/art.go')
-rw-r--r--build/art.go20
1 files changed, 18 insertions, 2 deletions
diff --git a/build/art.go b/build/art.go
index b82e974bd8..0e5c055d26 100644
--- a/build/art.go
+++ b/build/art.go
@@ -377,7 +377,7 @@ func artHostTestApexBundleFactory() android.Module {
}
func artGlobalDefaultsFactory() android.Module {
- module := cc.DefaultsFactory()
+ module := artDefaultsFactory()
android.AddLoadHook(module, addImplicitFlags)
android.AddLoadHook(module, globalDefaults)
@@ -385,11 +385,18 @@ func artGlobalDefaultsFactory() android.Module {
}
func artDefaultsFactory() android.Module {
- return cc.DefaultsFactory()
+ c := &codegenProperties{}
+ module := cc.DefaultsFactory(c)
+ android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, staticAndSharedLibrary) })
+
+ return module
}
func artLibrary() android.Module {
module := cc.LibraryFactory()
+
+ installCodegenCustomizer(module, staticAndSharedLibrary)
+
android.AddLoadHook(module, addImplicitFlags)
android.AddInstallHook(module, addTestcasesFile)
return module
@@ -397,6 +404,9 @@ func artLibrary() android.Module {
func artStaticLibrary() android.Module {
module := cc.LibraryStaticFactory()
+
+ installCodegenCustomizer(module, staticLibrary)
+
android.AddLoadHook(module, addImplicitFlags)
return module
}
@@ -414,6 +424,9 @@ func artBinary() android.Module {
func artTest() android.Module {
// Disable bp2build.
module := cc.NewTest(android.HostAndDeviceSupported, false /* bazelable */).Init()
+
+ installCodegenCustomizer(module, binary)
+
android.AddLoadHook(module, addImplicitFlags)
android.AddLoadHook(module, customLinker)
android.AddLoadHook(module, prefer32Bit)
@@ -423,6 +436,9 @@ func artTest() android.Module {
func artTestLibrary() android.Module {
module := cc.TestLibraryFactory()
+
+ installCodegenCustomizer(module, staticAndSharedLibrary)
+
android.AddLoadHook(module, addImplicitFlags)
android.AddLoadHook(module, prefer32Bit)
android.AddInstallHook(module, testInstall)