[build] Switch builds to the ninja in DEPS
Note: this "upgrades" ninja to 1.11.1. Change-Id: Idca0f8a2a67cf5d5dbe75661bb14de174012580f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261101 Reviewed-by: Daco Harkes <dacoharkes@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
This commit is contained in:
committed by
Commit Queue
parent
28263235b6
commit
e87f2d895c
@@ -22,6 +22,8 @@ assert(is_win)
|
||||
# This tool will is used as a wrapper for various commands below.
|
||||
tool_wrapper_path = rebase_path("tool_wrapper.py", root_build_dir)
|
||||
|
||||
ninja_path = rebase_path("//buildtools/ninja/ninja")
|
||||
|
||||
if (use_goma) {
|
||||
goma_prefix = "$goma_dir/gomacc.exe "
|
||||
} else {
|
||||
@@ -72,7 +74,7 @@ template("msvc_toolchain") {
|
||||
# TODO(brettw) enable this when GN support in the binary has been rolled.
|
||||
#precompiled_header_type = "msvc"
|
||||
pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb"
|
||||
command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
|
||||
command = "$ninja_path -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
|
||||
depsformat = "msvc"
|
||||
description = "CC {{output}}"
|
||||
outputs = [
|
||||
@@ -93,7 +95,7 @@ template("msvc_toolchain") {
|
||||
if (is_clang && invoker.current_cpu == "x86") {
|
||||
flags = "-m32"
|
||||
}
|
||||
command = "ninja -t msvc -e $env -- $cl $flags /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
|
||||
command = "$ninja_path -t msvc -e $env -- $cl $flags /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
|
||||
depsformat = "msvc"
|
||||
description = "CXX {{output}}"
|
||||
outputs = [
|
||||
|
||||
@@ -15,7 +15,7 @@ dumps. Example:
|
||||
|
||||
# obtain symbol data from first binary in /tmp/nm1.dump
|
||||
cd $CHECKOUT1_SRC
|
||||
ninja -C out/Release binary_size_tool
|
||||
buildtools/ninja/ninja -C out/Release binary_size_tool
|
||||
tools/binary_size/run_binary_size_analysis \
|
||||
--library <path_to_library>
|
||||
--destdir /tmp/throwaway
|
||||
@@ -23,7 +23,7 @@ dumps. Example:
|
||||
|
||||
# obtain symbol data from second binary in /tmp/nm2.dump
|
||||
cd $CHECKOUT2_SRC
|
||||
ninja -C out/Release binary_size_tool
|
||||
buildtools/ninja/ninja -C out/Release binary_size_tool
|
||||
tools/binary_size/run_binary_size_analysis \
|
||||
--library <path_to_library>
|
||||
--destdir /tmp/throwaway
|
||||
|
||||
@@ -88,7 +88,7 @@ Usage: dart runtime/tools/wiki/xref_extractor/bin/main.dart <path-to-cquery>
|
||||
/// same input C++ files and this greatly confuses cquery.
|
||||
Future<void> generateCompileCommands() async {
|
||||
print('Extracting compilation commands from build files for ReleaseX64');
|
||||
final result = await Process.run('ninja', [
|
||||
final result = await Process.run('buildtools/ninja/ninja', [
|
||||
'-C',
|
||||
'${Platform.isMacOS ? 'xcodebuild' : 'out'}/ReleaseX64',
|
||||
'-t',
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ def BuildOneConfig(options, targets, target_os, mode, arch, sanitizer):
|
||||
build_config = utils.GetBuildConf(mode, arch, target_os, sanitizer)
|
||||
out_dir = utils.GetBuildRoot(HOST_OS, mode, arch, target_os, sanitizer)
|
||||
using_goma = False
|
||||
command = ['ninja', '-C', out_dir]
|
||||
command = ['buildtools/ninja/ninja', '-C', out_dir]
|
||||
if options.verbose:
|
||||
command += ['-v']
|
||||
if UseGoma(out_dir):
|
||||
|
||||
@@ -12,6 +12,7 @@ analysis_options.yaml for the Dart analyzer.
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
@@ -76,7 +77,8 @@ def GenerateCompileCommands(options):
|
||||
# Remove ninja prepend on Windows.
|
||||
# This is not fully correct, as now it fails to find a sysroot for
|
||||
# Windows. However, clangd completely fails with the `-t` flag.
|
||||
command = command.replace("ninja -t msvc -e environment.x64 --", "")
|
||||
command = re.sub(r"([^\s]*)ninja -t msvc -e environment.x64 --", "",
|
||||
command)
|
||||
|
||||
# Add sysroot from out\DebugX64\environment.x64 on Windows.
|
||||
# TODO(dacoharkes): Fetch the paths from that file.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
# BSD-style license that can be found in the LICENSE file.
|
||||
set -x
|
||||
|
||||
ninja=$(which ninja)
|
||||
depot_tools=$(dirname $ninja)
|
||||
fetch=$(which fetch)
|
||||
depot_tools=$(dirname $fetch)
|
||||
image="debian-package:0.1"
|
||||
dockerfile=tools/linux_dist_support/Debian.dockerfile
|
||||
docker build --build-arg depot_tools=$depot_tools -t $image - < $dockerfile
|
||||
|
||||
Reference in New Issue
Block a user