When building with the --experimental_guard_against_concurrent_changes flag, outputs are not uploaded to the (remote) cache due to WARNING: skipping uploading outputs because of concurrent modifications with --experimental_guard_against_concurrent_changes.
This MR aims to introduce a workaround until https://gitlab.kitware.com/utils/kwsys/-/merge_requests/303 is merged by copying the source files in the sandbox to the build directory, and performing an in-source cmake build, replicating the functionality of configure_in_place for the configure_make rule.
cmake
versions above 2.35.5 introduces an issue described at https://gitlab.kitware.com/cmake/cmake/-/issues/26293 which copies symlinks in the sandbox to the build directory.When building with the
--experimental_guard_against_concurrent_changes
flag, outputs are not uploaded to the (remote) cache due toWARNING: skipping uploading outputs because of concurrent modifications with --experimental_guard_against_concurrent_changes
.This can be reproduced via: https://github.com/rueteh/rfcc_cmake_build/tree/main and running
bazel build --disk_cache=/tmp/cache //:_cmake --sandbox_debug
.This MR aims to introduce a workaround until https://gitlab.kitware.com/utils/kwsys/-/merge_requests/303 is merged by copying the source files in the sandbox to the build directory, and performing an in-source cmake build, replicating the functionality of
configure_in_place
for theconfigure_make
rule.