summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2020-10-20 18:23:33 +0900
committer Jiyong Park <jiyong@google.com> 2020-10-22 22:04:08 +0900
commit957bcd9c32640bef83052b28105a2843bc26c8f6 (patch)
tree493207d2cba798fcd71df0fad88c033250a5f4c3 /java/java.go
parentd9052d177c3a851e96db516fe3fe3ad51b69a1fa (diff)
InstallPath keeps its partition dir
This change introduces the concept of partition dir for InstallPaths. It's the path to the partition where the InstallPath is rooted at. For example, it's out/soong/target/product/<device>/<partitoon> for paths created for device modules. For host modules, it is defined as out/soong/host/<host_os>-<host_arch>. The partition dir is obtained using the new PartitionDir() function. Another change is that a freshly created InstallPath (usually via PathForModuleInstall) is the result of joining PartitionDir() and the remaining path elements. For example, PathForModuleInstall(ctx, "foo", "bar").Rel() now returns "foo/bar". Previously, that call returned the relative path from config.buildDir() ("out/soong"). This change is in line with the behavior of other path-creating functions like PathForModuleSrc where Rel() returns the path relative to the contextually determined path like the module source directory. Notice that the Join() call to InstallPath doesn't change PartitionDir(), while does change the result of Rel(). p := PathForModuleInstall(ctx, "foo", "bar") p.PartitionDir() is out/soong/host/linux-x86 p.Rel() is foo/bar q := p.Join(ctx, "baz") q.PartitionDir() is still out/soong/host/linux-x86 q.Rel() now returns baz Bug: N/A Test: m nothing Change-Id: I916bb1c782a4bfe0fbd4854e349cd2a2a42f56b6
Diffstat (limited to 'java/java.go')
0 files changed, 0 insertions, 0 deletions