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

Commit 6cee077b authored by Vic Yang's avatar Vic Yang Committed by Gerrit Code Review
Browse files

Merge "Disable no-vendor-variant VNDK for CFI modules"

parents dcbc3297 1a5812a2
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1104,7 +1104,21 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
			if ctx.isVndkSp() {
				library.baseInstaller.subDir = "vndk-sp"
			} else if ctx.isVndk() {
				if !ctx.mustUseVendorVariant() && !ctx.isVndkExt() {
				mayUseCoreVariant := true

				if ctx.mustUseVendorVariant() {
					mayUseCoreVariant = false
				}

				if ctx.isVndkExt() {
					mayUseCoreVariant = false
				}

				if ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && ctx.Arch().ArchType == android.Arm64 {
					mayUseCoreVariant = false
				}

				if mayUseCoreVariant {
					library.checkSameCoreVariant = true
					if ctx.DeviceConfig().VndkUseCoreVariant() {
						library.useCoreVariant = true