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

Commit 3108ce17 authored by Colin Cross's avatar Colin Cross
Browse files

Add dependency from hostdex installed module to Make intermediates

The art tests rely on a dependency existing from
out/host/linux-x86/framework/core-oj-hostdex.jar to
out/host/common/obj/JAVA_LIBRARIES/core-oj-hostdex_intermediates/classes.jar,
override LOCAL_SOONG_INSTALLED_MODULE for the hostdex modules so that
soong_java_prebuilt.mk adds the dependency.

Test: art/tools/buildbot-build.sh --host && art/tools/run-libcore-tests.sh '--mode=host' '--variant=X64' --debug
Change-Id: I9412147fc66d5e5f0dae52d522868a37251f781e
parent 02ce1e78
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ func (library *Library) AndroidMkEntriesHostDex() android.AndroidMkEntries {
					if library.dexJarFile.IsSet() {
						entries.SetPath("LOCAL_SOONG_DEX_JAR", library.dexJarFile.Path())
					}
					entries.SetPath("LOCAL_SOONG_INSTALLED_MODULE", library.hostdexInstallFile)
					entries.SetPath("LOCAL_SOONG_HEADER_JAR", library.headerJarFile)
					entries.SetPath("LOCAL_SOONG_CLASSES_JAR", library.implementationAndResourcesJar)
					entries.SetString("LOCAL_MODULE_STEM", library.Stem()+"-hostdex")
+3 −0
Original line number Diff line number Diff line
@@ -407,6 +407,9 @@ type Module struct {
	// installed file for binary dependency
	installFile android.Path

	// installed file for hostdex copy
	hostdexInstallFile android.InstallPath

	// list of .java files and srcjars that was passed to javac
	compiledJavaSrcs android.Paths
	compiledSrcJars  android.Paths
+2 −1
Original line number Diff line number Diff line
@@ -571,7 +571,8 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
		}
		hostDexNeeded := Bool(j.deviceProperties.Hostdex) && !ctx.Host()
		if hostDexNeeded {
			ctx.InstallFile(android.PathForHostDexInstall(ctx, "framework"),
			j.hostdexInstallFile = ctx.InstallFile(
				android.PathForHostDexInstall(ctx, "framework"),
				j.Stem()+"-hostdex.jar", j.outputFile)
		}
		var installDir android.InstallPath