blob: 3acdfa3d3555f4670afe10038e52f36ebefac0dc [file] [log] [blame]
# Copyright 2013 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Defines the configuration of Goma.
import("//build/toolchain/siso.gni")
declare_args() {
# Set to true to enable distributed compilation using Goma.
use_goma = false
# Absolute directory containing the gomacc binary.
goma_dir = ""
}
if (use_goma && goma_dir == "") {
goma_dir = exec_script("get_goma_dir.py", [], "string")
}
assert(!is_win || !use_goma || is_clang,
"cl.exe does not work on goma, use clang")
# TODO(b/41489832): remove this after goma shutdown.
assert(
!use_goma || target_os == "chromeos",
"use_goma can only be used for ChromeOS build now." +
" Use use_remoteexec=true instead for other build." +
" See build instructions from " + "https://source.chromium.org/search?q=%22Use%20Reclient%22&ss=chromium%2Fchromium%2Fsrc:docs%2F")
if (use_goma && current_toolchain == default_toolchain) {
if (host_os == "win") {
print("The gn arg use_goma=true will be deprecated by EOY 2023. " +
"Please use `use_remoteexec=true` instead. See " +
"https://chromium.googlesource.com/chromium/src/+/main/docs/" +
"windows_build_instructions.md#use-reclient " +
"for setup instructions.")
} else if (host_os == "mac") {
print("The gn arg use_goma=true will be deprecated by EOY 2023. " +
"Please use `use_remoteexec=true` instead. " +
"If you are a googler see http://go/building-chrome-mac" +
"#using-remote-execution for setup instructions.")
} else {
print("The gn arg use_goma=true will be deprecated by EOY 2023. " +
"Please use `use_remoteexec=true` instead. See " +
"https://chromium.googlesource.com/chromium/src/+/main/docs/" +
"linux/build_instructions.md#use-reclient for setup instructions.")
}
assert(!use_siso,
"Siso does not support Goma. Use use_remoteexec=true instead.")
}