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

Commit f7df9b7e authored by Jiyong Park's avatar Jiyong Park
Browse files

Fix: 'required' property is ignored

This change fixes a bug that the 'required' property of a module is
ignored when the module is using a shared from an APEX. This is
happening because LOCAL_REQUIRED_MODULES is overwritten (with := instead
of +=) when ApexesProvidingSharedLibs is not empty.

Fixing the bug by appending ApexesProvidingSharedLibs to
AndroidMkData.Reuired so that it is handled in android/androidmk.go

Test: m
Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044
and make sure that system/bin/vold_prepare_subdirs exist.

Change-Id: Ie57bca480ba4198b4da0df1c73e92fa42b5ebda8
parent 189ff986
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ func (c *Module) AndroidMk() android.AndroidMkData {

	ret := android.AndroidMkData{
		OutputFile: c.outputFile,
		Required:   c.Properties.AndroidMkRuntimeLibs,
		Required:   append(c.Properties.AndroidMkRuntimeLibs, c.Properties.ApexesProvidingSharedLibs...),
		Include:    "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk",

		Extra: []android.AndroidMkExtraFunc{
@@ -76,9 +76,6 @@ func (c *Module) AndroidMk() android.AndroidMkData {
				if len(c.Properties.AndroidMkWholeStaticLibs) > 0 {
					fmt.Fprintln(w, "LOCAL_WHOLE_STATIC_LIBRARIES := "+strings.Join(c.Properties.AndroidMkWholeStaticLibs, " "))
				}
				if len(c.Properties.ApexesProvidingSharedLibs) > 0 {
					fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(c.Properties.ApexesProvidingSharedLibs, " "))
				}
				fmt.Fprintln(w, "LOCAL_SOONG_LINK_TYPE :=", c.getMakeLinkType())
				if c.useVndk() {
					fmt.Fprintln(w, "LOCAL_USE_VNDK := true")