platform_build_soong/ui/build
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
..
paths Switch to toybox dd. 2023-08-17 16:25:30 +00:00
sandbox/darwin
Android.bp Refactor upload-only to process bazel metrics outside of upload.go 2023-05-09 20:19:20 +00:00
bazel_metrics.go Add bes-id to soong. Also renames the proto field. 2023-06-21 14:48:17 +00:00
build.go Generate build_number.txt only once 2023-09-28 17:56:43 -07:00
cleanbuild.go Clean $OUT/ramdisk_16k dir during installclean 2023-06-05 10:20:50 -07:00
cleanbuild_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
config.go Generate build_number.txt only once 2023-09-28 17:56:43 -07:00
config_darwin.go
config_linux.go
config_test.go Remove bazel dev mode 2023-06-15 14:14:19 +00:00
context.go Add critical path infomation into metrics 2023-03-14 17:59:22 +09:00
dumpvars.go Revert "Add BUILD_BROKEN_VENDOR_SEAPP_USES_COREDOMAIN" 2023-08-23 02:07:40 +00:00
environment.go cd to / before running soong_build . 2021-03-03 09:14:22 +01:00
environment_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
exec.go Collect useful resource information of each executed process in soong_ui. 2020-11-04 23:35:43 +00:00
finder.go Change bp2build converter of module "package". 2023-05-09 17:37:04 -07:00
goma.go
kati.go Generate build_number.txt only once 2023-09-28 17:56:43 -07:00
ninja.go Allow actions to read BUILD_BROKEN_INCORRECT_PARTITION_IMAGES 2023-09-08 15:58:13 -07:00
path.go Add BUILD_BROKEN_PYTHON_IS_PYTHON2 2023-02-27 13:02:02 -08:00
proc_sync.go
proc_sync_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00
rbe.go Remove "dumping rbe metrics" message 2023-05-03 18:21:05 -07:00
rbe_test.go Cleanup RBE logs directory 2022-06-08 11:50:33 -04:00
sandbox_config.go nsjail support verification should respect BUILD_BROKEN* flag for SrcDir 2022-11-14 19:50:40 +00:00
sandbox_darwin.go
sandbox_linux.go nsjail support verification should respect BUILD_BROKEN* flag for SrcDir 2022-11-14 19:50:40 +00:00
sandbox_linux_test.go Create Make flags to set source tree as ReadOnly in soong builds 2021-06-01 21:40:49 +00:00
soong.go Update symlinks in output directory when TOP dir changes 2023-10-04 21:07:36 +00:00
staging_snapshot.go Add a post-build step for dist builds that records what changed in the build. 2023-02-28 15:02:22 -08:00
staging_snapshot_test.go Add a post-build step for dist builds that records what changed in the build. 2023-02-28 15:02:22 -08:00
test_build.go Ignore bazel-generated paths in dangling rule test 2022-11-14 13:41:02 -05:00
upload.go Refactor upload-only to process bazel metrics outside of upload.go 2023-05-09 20:19:20 +00:00
upload_test.go Refactor upload-only to process bazel metrics outside of upload.go 2023-05-09 20:19:20 +00:00
util.go Dist build.ninja and Android.bp.list 2020-06-25 12:50:00 -07:00
util_test.go Revert "Make lots of tests run in parallel" 2020-10-09 18:34:24 -07:00