Commit ee4c20c2 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

Revert "Add disable_goma for args.gn on win"

This reverts commit 953fcf3f.

Reason for revert: We want to set envvar directly.

Original change's description:
> Add disable_goma for args.gn on win
>
> Switching use_goma causes full rebuild due to command line update in build.ninja.
> I added disable_goma to set GOMA_DISABLED on environment.{x86,x64}.
>
> If we specify disable_goma=true, GOMA_DISABLED env is passed to gomacc.
> Then gomacc executes given argument instead of sending args to goma daemon.
>
> This will help toolchain maintainer to check difference of build behavior w/wo goma without rebuilding everything.
>
> Bug:
> Change-Id: Ie58958b5484d57be1c40fbbca363f1eef4b55c7e
> Reviewed-on: https://chromium-review.googlesource.com/768549
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#518134}

TBR=dpranke@chromium.org,brucedawson@chromium.org,tikuta@chromium.org

Change-Id: Ia2d510f4149b30cff3f8dc6c0b89e37190c39368
Reviewed-on: https://chromium-review.googlesource.com/1015860Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551602}
parent edb21f07
......@@ -13,12 +13,6 @@ import("//build/toolchain/toolchain.gni")
assert(is_win)
if (disable_goma) {
goma_disabled = "true"
} else {
goma_disabled = "false"
}
declare_args() {
# Set this to true to enable static analysis through Visual Studio's
# /analyze. This dramatically slows compiles and reports thousands of
......@@ -319,7 +313,6 @@ config("sdk_link") {
current_os,
current_cpu,
"none",
goma_disabled,
],
"scope")
......
......@@ -8,10 +8,6 @@ declare_args() {
# Set to true to enable distributed compilation using Goma.
use_goma = false
# Set to true to disable goma without update of command line.
# Changing this value does not cause full rebuild.
disable_goma = false
# Set the default value based on the platform.
if (host_os == "win") {
# Absolute directory containing the gomacc.exe binary.
......@@ -29,6 +25,3 @@ declare_args() {
assert(!(is_win && host_os != "win") || !use_goma,
"goma does not yet work in win cross builds, b/64390790")
assert(!disable_goma || use_goma,
"disable_goma = true has no meaning if use_goma = false")
......@@ -32,12 +32,6 @@ if (use_goma) {
goma_prefix = ""
}
if (disable_goma) {
goma_disabled = "true"
} else {
goma_disabled = "false"
}
# Copy the VS runtime DLL for the default toolchain to the root build directory
# so things will run.
if (current_toolchain == default_toolchain) {
......@@ -130,13 +124,7 @@ template("msvc_toolchain") {
# %PATH%) -- e.g. 32-bit MSVS builds require %PATH% to be set and just
# passing in a list of include directories isn't enough.
if (defined(invoker.sys_include_flags)) {
if (disable_goma) {
# If disable_goma = true, need to pass GOMA_DISABLED env to
# gomacc.exe via environment.{x86,x64}.
env_wrapper = "ninja -t msvc -e $env -- " # Note trailing space.
} else {
env_wrapper = ""
}
env_wrapper = ""
sys_include_flags = "${invoker.sys_include_flags} " # Note trailing space.
} else {
# clang-cl doesn't need this env hoop, so omit it there.
......@@ -360,7 +348,6 @@ if (target_os == "win" &&
target_os,
target_cpu,
"environment." + target_cpu,
goma_disabled,
],
"scope")
......@@ -397,7 +384,6 @@ x64_toolchain_data = exec_script("setup_toolchain.py",
"win",
"x64",
"environment.x64",
goma_disabled,
],
"scope")
......@@ -463,7 +449,6 @@ if (target_os == "winuwp") {
target_os,
target_cpu,
"environment.store_" + target_cpu,
goma_disabled,
],
"scope")
......
......@@ -182,11 +182,11 @@ def _LowercaseDict(d):
def main():
if len(sys.argv) != 8:
if len(sys.argv) != 7:
print('Usage setup_toolchain.py '
'<visual studio path> <win sdk path> '
'<runtime dirs> <target_os> <target_cpu> '
'<environment block name|none> <goma_disabled>')
'<environment block name|none>')
sys.exit(2)
win_sdk_path = sys.argv[2]
runtime_dirs = sys.argv[3]
......@@ -195,7 +195,6 @@ def main():
environment_block_name = sys.argv[6]
if (environment_block_name == 'none'):
environment_block_name = ''
goma_disabled = sys.argv[7]
if (target_os == 'winuwp'):
target_store = True
......@@ -218,7 +217,6 @@ def main():
# Extract environment variables for subprocesses.
env = _LoadToolchainEnv(cpu, win_sdk_path, target_store)
env['PATH'] = runtime_dirs + os.pathsep + env['PATH']
env['GOMA_DISABLED'] = goma_disabled
for path in env['PATH'].split(os.pathsep):
if os.path.exists(os.path.join(path, 'cl.exe')):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment