summaryrefslogtreecommitdiffstats
path: root/tools/gn/command_gen.cc
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 09:27:04 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 09:27:04 +0000
commit69a4548e0ab3fbb1531b4df89708bfab9cf0df20 (patch)
treeab77a5fe7f52b55970950374ceb22f4be8e4ea53 /tools/gn/command_gen.cc
parentd5f9c7ceb6d59748ad07bb96194b44b516c3c1ad (diff)
downloadchromium_src-69a4548e0ab3fbb1531b4df89708bfab9cf0df20.zip
chromium_src-69a4548e0ab3fbb1531b4df89708bfab9cf0df20.tar.gz
chromium_src-69a4548e0ab3fbb1531b4df89708bfab9cf0df20.tar.bz2
Revert 214254 "Add initial prototype for the GN meta-buildsystem."
It broke the check_licenses step on Android (see http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28dbg%29/builds/39904/steps/check_licenses/logs/stdio): @@@BUILD_STEP check_licenses@@@ > /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/base/third_party/dynamic_annotations Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/third_party/modp_b64 < /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan ERROR: process exited with code 2 @@@STEP_FAILURE@@@ > Add initial prototype for the GN meta-buildsystem. > > This is currently not hooked into the build. To build, add a reference to the > gn.gyp file to build/all.gyp > > R=darin@chromium.org, scottmg@chromium.org > > Review URL: https://codereview.chromium.org/21114002 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/21084010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/command_gen.cc')
-rw-r--r--tools/gn/command_gen.cc66
1 files changed, 0 insertions, 66 deletions
diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc
deleted file mode 100644
index ab64a8d..0000000
--- a/tools/gn/command_gen.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2013 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.
-
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/time/time.h"
-#include "tools/gn/build_settings.h"
-#include "tools/gn/commands.h"
-#include "tools/gn/ninja_target_writer.h"
-#include "tools/gn/ninja_writer.h"
-#include "tools/gn/scheduler.h"
-#include "tools/gn/setup.h"
-#include "tools/gn/standard_out.h"
-
-namespace {
-
-// Suppress output on success.
-const char kSwitchQuiet[] = "q";
-
-} // namespace
-
-int RunGenCommand(const std::vector<std::string>& args) {
- base::TimeTicks begin_time = base::TimeTicks::Now();
-
- // Deliberately leaked to avoid expensive process teardown.
- Setup* setup = new Setup;
- if (!setup->DoSetup())
- return 1;
-
- // Cause the load to also generate the ninja files for each target.
- setup->build_settings().set_target_resolved_callback(
- base::Bind(&NinjaTargetWriter::RunAndWriteFile));
-
- // Do the actual load. This will also write out the target ninja files.
- if (!setup->Run())
- return 1;
-
- // Write the root ninja files.
- if (!NinjaWriter::RunAndWriteFiles(&setup->build_settings())) {
- Err(Location(),
- "Couldn't open root buildfile(s) for writing").PrintToStdout();
- return 1;
- }
-
- base::TimeTicks end_time = base::TimeTicks::Now();
-
- if (!CommandLine::ForCurrentProcess()->HasSwitch(kSwitchQuiet)) {
- OutputString("Done. ", DECORATION_GREEN);
-
- // TODO(brettw) get the number of targets without getting the entire list.
- std::vector<const Target*> all_targets;
- setup->build_settings().target_manager().GetAllTargets(&all_targets);
- std::string stats = "Generated " +
- base::IntToString(static_cast<int>(all_targets.size())) +
- " targets from " +
- base::IntToString(
- setup->scheduler().input_file_manager()->GetInputFileCount()) +
- " files in " +
- base::IntToString((end_time - begin_time).InMilliseconds()) + "ms\n";
- OutputString(stats);
- }
-
- return 0;
-}