[build] Handle RBE in -fdebug-prefix-map.

The RBE build happens in a different working directory when run
remotely and the -fdebug-prefix-map option with a local path inhibits
cache sharing between tryjobs and developers. This change fixes the
RBE object files so they don't contain the remote absolute path and
also ensures the build commands can be cache shared.

Bug: b/296994239
Change-Id: I6d2cd42fd775724ccb5c335c85b5f31ad279624f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342342
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This commit is contained in:
Jonas Termansen 2023-12-19 10:28:33 +00:00 committed by Commit Queue
parent 2ff976e9e3
commit a5109dc82b

View file

@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/rbe.gni")
# This config causes functions not to be automatically exported from shared
# libraries. By default, all symbols are exported but this means there are
# lots of exports that slow everything down. In general we explicitly mark
@ -57,7 +59,11 @@ config("relative_paths") {
# if root_build_dir is not a subdirectory //, but there isn't a better
# option to keep all source file name references uniformly relative to
# a single root.
absolute_path = rebase_path("//")
if (use_rbe) {
absolute_path = "/b/f/w/"
} else {
absolute_path = rebase_path("//")
}
relative_path = ""
cflags = [
# This makes sure that the DW_AT_comp_dir string (the current