build: Set a fixed dummy path for module cache directory
This makes it possible to get deterministic module files even if users
use different out directory for chrome build.
Bug: 448270644
Change-Id: I6228316242f7fb854a8abcb6d54e5f39232a8385
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6998875
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1523403}
NOKEYCHECK=True
GitOrigin-RevId: b10e46876e506bf559a7b085893a69c7706f8dfa
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
index 078c049..2ef2d2f 100644
--- a/config/compiler/BUILD.gn
+++ b/config/compiler/BUILD.gn
@@ -1742,6 +1742,12 @@
# This removes absolute paths from .pcm files.
"-Xclang",
"-fmodule-file-home-is-cwd",
+
+ # Set a fixed dummy path to get deterministic module files even if the
+ # build happens in a different directory. See https://crbug.com/448270644
+ # for more context.
+ "-Xclang",
+ "-fmodules-cache-path=/not_exist_dummy_dir",
]
}
}