platform_build_soong/ui
Kousik Kumar ca390b2f00 Update symlinks in output directory when TOP dir changes
When TOP dir changes and we reuse the same output between the old and new checkouts, we need to rewrite all the symlinks used by Bazel and other tools in the out-directory to point to the new top directory. Otherwise, if the old source dir is deleted, the build will fail.

I used the OUT_DIR/soong/soong.environment.available file to find out the previous PWD.

Tested:
1. Create source dir 1, run build, create source dir 2, remote source dir 1, reuse out dir and rerun build => build succeeded with this change.
2. m libc after moving build TOP. Only the analysis phase was rerun, the actual build was not rerun.

Bug: b/300498226

Change-Id: I196625baa1f4efe7a4734accfa1f0be7c98a7920
2023-10-04 21:07:36 +00:00
..
build Update symlinks in output directory when TOP dir changes 2023-10-04 21:07:36 +00:00
logger Add non-zero exit + error message to soong metrics 2022-10-24 10:51:56 -04:00
metrics Add unconverted_reasons_from_heuristics fields to the Module message 2023-07-13 13:31:09 +00:00
signal Reformat build/soong for go 1.19 2022-08-17 10:43:13 -07:00
status Stop NinjaReader from sending new status messages after Close 2023-09-05 11:11:29 -07:00
terminal After a build action fails, stop printing more output. 2023-06-24 15:13:49 -07:00
tracer Include tags in trace data. 2023-06-21 20:17:57 +00:00