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

Commit 9d46dcf9 authored by Sasha Smundak's avatar Sasha Smundak
Browse files

Fix config string for the generic target.

For the generic target (i.e, arch == "common" and os == Device), the config
 string should be "target|common", not "x86_64|common".
 Also renamed local variable from `os`.

Bug: 232085015
Test: treehugger
Change-Id: I36e696203f207dd295ed7f109b7c07b576ebf3c2
parent 9c4216a4
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -949,9 +949,16 @@ func getCqueryId(key cqueryKey) string {
func getConfigString(key cqueryKey) string {
	arch := key.configKey.arch
	if len(arch) == 0 || arch == "common" {
		if key.configKey.osType.Class == Device {
			// For the generic Android, the expected result is "target|android", which
			// corresponds to the product_variable_config named "android_target" in
			// build/bazel/platforms/BUILD.bazel.
			arch = "target"
		} else {
			// Use host platform, which is currently hardcoded to be x86_64.
			arch = "x86_64"
		}
	}
	osName := key.configKey.osType.Name
	if len(osName) == 0 || osName == "common_os" || osName == "linux_glibc" {
		// Use host OS, which is currently hardcoded to be linux.