Always install to out/target instead of out/soong/target
So that when using soong-only builds, we don't have to update
a bunch of tools and other parts of soong that expect files in
out/target.
Bug: 383892968
Test: m nothing --no-skip-soong-tests
Change-Id: Idba3b5a416e6ffff799ec3ce632a8a4fbafe341f
diff --git a/android/module_test.go b/android/module_test.go
index d5bf941..6e6d449 100644
--- a/android/module_test.go
+++ b/android/module_test.go
@@ -327,21 +327,21 @@
outputRule := func(name string) TestingBuildParams { return module(name, false).Output(name) }
installRule := func(name string) TestingBuildParams {
- return module(name, false).Output(filepath.Join("out/soong/target/product/test_device/system", name))
+ return module(name, false).Output(filepath.Join("out/target/product/test_device/system", name))
}
symlinkRule := func(name string) TestingBuildParams {
- return module(name, false).Output(filepath.Join("out/soong/target/product/test_device/system/symlinks", name))
+ return module(name, false).Output(filepath.Join("out/target/product/test_device/system/symlinks", name))
}
hostOutputRule := func(name string) TestingBuildParams { return module(name, true).Output(name) }
hostInstallRule := func(name string) TestingBuildParams {
- return module(name, true).Output(filepath.Join("out/soong/host/linux-x86", name))
+ return module(name, true).Output(filepath.Join("out/host/linux-x86", name))
}
hostSymlinkRule := func(name string) TestingBuildParams {
- return module(name, true).Output(filepath.Join("out/soong/host/linux-x86/symlinks", name))
+ return module(name, true).Output(filepath.Join("out/host/linux-x86/symlinks", name))
}
assertInputs := func(params TestingBuildParams, inputs ...Path) {
diff --git a/android/paths.go b/android/paths.go
index 94f00ad..d57ac70 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -2076,7 +2076,7 @@
reportPathError(ctx, err)
}
- base := pathForPartitionInstallDir(ctx, partition, partitionPath, ctx.Config().KatiEnabled())
+ base := pathForPartitionInstallDir(ctx, partition, partitionPath, true)
return base.Join(ctx, pathComponents...)
}
diff --git a/android/paths_test.go b/android/paths_test.go
index 5e618f9..20beecc 100644
--- a/android/paths_test.go
+++ b/android/paths_test.go
@@ -1561,7 +1561,7 @@
t.Run("install for soong", func(t *testing.T) {
p := PathForModuleInstall(ctx, "install/path")
- AssertPathRelativeToTopEquals(t, "install path for soong", "out/soong/target/product/test_device/system/install/path", p)
+ AssertPathRelativeToTopEquals(t, "install path for soong", "out/target/product/test_device/system/install/path", p)
})
t.Run("install for make", func(t *testing.T) {
p := PathForModuleInstall(ctx, "install/path")
@@ -1584,7 +1584,7 @@
}
expected := []string{
- "out/soong/target/product/test_device/system/install/path",
+ "out/target/product/test_device/system/install/path",
"out/soong/output/path",
"source/path",
}
diff --git a/android/rule_builder_test.go b/android/rule_builder_test.go
index e1a1e08..566bafa 100644
--- a/android/rule_builder_test.go
+++ b/android/rule_builder_test.go
@@ -358,7 +358,7 @@
"command3 input3 out_local/soong/module/output2 out_local/soong/module/output3 input3 out_local/soong/module/output2",
}
- wantDepMergerCommand := "out_local/soong/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer " +
+ wantDepMergerCommand := "out_local/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer " +
"out_local/soong/module/DepFile out_local/soong/module/depfile out_local/soong/module/ImplicitDepFile out_local/soong/module/depfile2"
AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())
@@ -388,7 +388,7 @@
"command3 input3 __SBOX_SANDBOX_DIR__/out/output2 __SBOX_SANDBOX_DIR__/out/output3 input3 __SBOX_SANDBOX_DIR__/out/output2",
}
- wantDepMergerCommand := "out_local/soong/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer __SBOX_SANDBOX_DIR__/out/DepFile __SBOX_SANDBOX_DIR__/out/depfile __SBOX_SANDBOX_DIR__/out/ImplicitDepFile __SBOX_SANDBOX_DIR__/out/depfile2"
+ wantDepMergerCommand := "out_local/host/" + ctx.Config().PrebuiltOS() + "/bin/dep_fixer __SBOX_SANDBOX_DIR__/out/DepFile __SBOX_SANDBOX_DIR__/out/depfile __SBOX_SANDBOX_DIR__/out/ImplicitDepFile __SBOX_SANDBOX_DIR__/out/depfile2"
AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())
@@ -664,7 +664,7 @@
rspFile := filepath.Join(outDir, "rsp")
rspFile2 := filepath.Join(outDir, "rsp2")
manifest := filepath.Join(outDir, "sbox.textproto")
- sbox := filepath.Join("out", "soong", "host", result.Config.PrebuiltOS(), "bin/sbox")
+ sbox := filepath.Join("out", "host", result.Config.PrebuiltOS(), "bin/sbox")
sandboxPath := shared.TempDirForOutDir("out/soong")
cmd := sbox + ` --sandbox-path ` + sandboxPath + ` --output-dir ` + sboxOutDir + ` --manifest ` + manifest
@@ -680,7 +680,7 @@
rspFile := filepath.Join(outDir, "rsp")
rspFile2 := filepath.Join(outDir, "rsp2")
manifest := filepath.Join(outDir, "sbox.textproto")
- sbox := filepath.Join("out", "soong", "host", result.Config.PrebuiltOS(), "bin/sbox")
+ sbox := filepath.Join("out", "host", result.Config.PrebuiltOS(), "bin/sbox")
sandboxPath := shared.TempDirForOutDir("out/soong")
cmd := sbox + ` --sandbox-path ` + sandboxPath + ` --output-dir ` + sboxOutDir + ` --manifest ` + manifest