Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions build/toolchain/gcc_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import("//build/toolchain/clang.gni")
import("//build/toolchain/clang_static_analyzer.gni")
import("//build/toolchain/goma.gni")
import("//build/toolchain/rbe.gni")

# Path to the Clang static analysis wrapper script.
Expand Down Expand Up @@ -124,7 +125,7 @@ template("gcc_toolchain") {
tool("cc") {
depfile = "{{output}}.d"
command = "$cc -MD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} $coverage_flags -c {{source}} -o {{output}}"
if (use_rbe) {
if (use_rbe || use_goma) {
# The depfile generated on an RBE worker can contain absolute paths.
# This sed command strips off the prefix, and rewrites to be
# relative to the buildroot.
Expand All @@ -139,7 +140,7 @@ template("gcc_toolchain") {
tool("cxx") {
depfile = "{{output}}.d"
command = "$cxx -MD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} $coverage_flags -c {{source}} -o {{output}}"
if (use_rbe) {
if (use_rbe || use_goma) {
command += " && sed -i 's@/b/f/w@../..@g' $depfile"
}
depsformat = "gcc"
Expand All @@ -151,7 +152,7 @@ template("gcc_toolchain") {
tool("asm") {
depfile = "{{output}}.d"
command = "$asm -MD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}} {{cflags}} {{cflags_c}} $coverage_flags -c {{source}} -o {{output}}"
if (use_rbe) {
if (use_rbe || use_goma) {
command += " && sed -i 's@/b/f/w@../..@g' $depfile"
}
depsformat = "gcc"
Expand Down