Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0342c582 authored by Logan Chien's avatar Logan Chien
Browse files

apex: Install nativeTest with soong_cc_prebuilt.mk

This commit switches the build rule for APEX nativeTests from
`$(BUILD_PREBUILT)` to `soong_cc_prebuilt.mk`.  Since these are not real
prebuilts, `soong_cc_prebuilt.mk` should be sufficient.

Using `soong_cc_prebuilt.mk` also fixes a problem reported by prebuilt
ELF checker because `LOCAL_SHARED_LIBRARIES` are not generated for
nativeTests.

Bug: 139525855
Test: lunch aosp_walleye-userdebug && make check-elf-files
Change-Id: I7bfc29f9c2708896dad4e7cfc214480e1205a51e
parent f59007cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1518,7 +1518,7 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, name, moduleDir string, apex
			fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", fi.builtFile.String())
			fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", fi.builtFile.String())
			fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
			fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
			fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_java_prebuilt.mk")
			fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_java_prebuilt.mk")
		} else if fi.class == nativeSharedLib || fi.class == nativeExecutable {
		} else if fi.class == nativeSharedLib || fi.class == nativeExecutable || fi.class == nativeTest {
			fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", fi.builtFile.Base())
			fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", fi.builtFile.Base())
			if cc, ok := fi.module.(*cc.Module); ok {
			if cc, ok := fi.module.(*cc.Module); ok {
				if cc.UnstrippedOutputFile() != nil {
				if cc.UnstrippedOutputFile() != nil {