Commit 9c9d1e18 authored by machenbach's avatar machenbach Committed by Commit bot

[mb] Copy MB from Chromium repo

This prepares deletion of MB on the Chromium side.

This runs validation of the v8 configs as presubmit and
removes some obsolete code that required chromium.

BUG=chromium:616035

Review-Url: https://codereview.chromium.org/2299953002
Cr-Commit-Position: refs/heads/master@{#39082}
parent bbe5c549
......@@ -81,7 +81,6 @@ shell_g
/tools/luci-go/linux64/isolate
/tools/luci-go/mac64/isolate
/tools/luci-go/win64/isolate.exe
/tools/mb
/tools/oom_dump/oom_dump
/tools/oom_dump/oom_dump.o
/tools/swarming_client
......
......@@ -25,8 +25,6 @@ deps = {
Var("git_url") + "/chromium/src/third_party/jinja2.git" + "@" + "2222b31554f03e62600cd7e383376a7c187967a1",
"v8/third_party/markupsafe":
Var("git_url") + "/chromium/src/third_party/markupsafe.git" + "@" + "484a5661041cac13bfc688a26ec5434b05d18961",
"v8/tools/mb":
Var('git_url') + '/chromium/src/tools/mb.git' + '@' + "2f9349ee2aec6dd7b167b26cbbcac2891a9649ab",
"v8/tools/swarming_client":
Var('git_url') + '/external/swarming.client.git' + '@' + "e4288c3040a32f2e7ad92f957668f2ee3d36e5a6",
"v8/testing/gtest":
......
brettw@chromium.org
dpranke@chromium.org
machenbach@chromium.org
# Copyright 2016 the V8 project authors. All rights reserved.
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def _CommonChecks(input_api, output_api):
results = []
# Run Pylint over the files in the directory.
pylint_checks = input_api.canned_checks.GetPylint(input_api, output_api)
results.extend(input_api.RunTests(pylint_checks))
# Run the MB unittests.
results.extend(input_api.canned_checks.RunUnitTestsInDirectory(
input_api, output_api, '.', [ r'^.+_unittest\.py$']))
# Validate the format of the mb_config.pyl file.
cmd = [input_api.python_executable, 'mb.py', 'validate']
kwargs = {'cwd': input_api.PresubmitLocalPath()}
results.extend(input_api.RunTests([
input_api.Command(name='mb_validate',
cmd=cmd, kwargs=kwargs,
message=output_api.PresubmitError)]))
results.extend(
input_api.canned_checks.CheckLongLines(
input_api,
output_api,
maxlen=80,
source_file_filter=lambda x: 'mb_config.pyl' in x.LocalPath()))
return results
def CheckChangeOnUpload(input_api, output_api):
return _CommonChecks(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return _CommonChecks(input_api, output_api)
# MB - The Meta-Build wrapper
MB is a simple wrapper intended to provide a uniform interface to either
GYP or GN, such that users and bots can call one script and not need to
worry about whether a given bot is meant to use GN or GYP.
It supports two main functions:
1. "gen" - the main `gyp_chromium` / `gn gen` invocation that generates the
Ninja files needed for the build.
2. "analyze" - the step that takes a list of modified files and a list of
desired targets and reports which targets will need to be rebuilt.
We also use MB as a forcing function to collect all of the different
build configurations that we actually support for Chromium builds into
one place, in `//tools/mb/mb_config.pyl`.
For more information, see:
* [The User Guide](docs/user_guide.md)
* [The Design Spec](docs/design_spec.md)
# The MB (Meta-Build wrapper) documentation
* The [User Guide](user_guide.md)
* The [Design Spec](design_spec.md)
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env bash
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/mb.py" "$@"
@echo off
setlocal
:: This is required with cygwin only.
PATH=%~dp0;%PATH%
set PYTHONDONTWRITEBYTECODE=1
call python "%~dp0mb.py" %*
This diff is collapsed.
This diff is collapsed.
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