summaryrefslogtreecommitdiffstats
path: root/tools/gn/settings.h
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/settings.h
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/settings.h')
-rw-r--r--tools/gn/settings.h107
1 files changed, 0 insertions, 107 deletions
diff --git a/tools/gn/settings.h b/tools/gn/settings.h
deleted file mode 100644
index 93a1ae6..0000000
--- a/tools/gn/settings.h
+++ /dev/null
@@ -1,107 +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.
-
-#ifndef TOOLS_GN_SETTINGS_H_
-#define TOOLS_GN_SETTINGS_H_
-
-#include "base/files/file_path.h"
-#include "tools/gn/build_settings.h"
-#include "tools/gn/import_manager.h"
-#include "tools/gn/output_file.h"
-#include "tools/gn/scope.h"
-#include "tools/gn/source_dir.h"
-#include "tools/gn/toolchain.h"
-
-// Holds the settings for one toolchain invocation. There will be one
-// Settings object for each toolchain type, each referring to the same
-// BuildSettings object for shared stuff.
-//
-// The Settings object is const once it is constructed, which allows us to
-// use it from multiple threads during target generation without locking (which
-// is important, because it gets used a lot).
-//
-// The Toolchain object holds the set of stuff that is set by the toolchain
-// declaration, which obviously needs to be set later when we actually parse
-// the file with the toolchain declaration in it.
-class Settings {
- public:
- enum TargetOS {
- UNKNOWN,
- LINUX,
- MAC,
- WIN
- };
-
- // Constructs a toolchain settings. The output_subdir_name is the name we
- // should use for the subdirectory in the build output directory for this
- // toolchain's outputs. It should have no slashes in it. The default
- // toolchain should use an empty string.
- Settings(const BuildSettings* build_settings,
- const Toolchain* toolchain,
- const std::string& output_subdir_name);
- ~Settings();
-
- const BuildSettings* build_settings() const { return build_settings_; }
-
- // Danger: this must only be used for getting the toolchain label until the
- // toolchain has been resolved. Otherwise, it will be modified on an
- // arbitrary thread when the toolchain invocation is found. Generally, you
- // will only read this from the target generation where we know everything
- // has been resolved and won't change.
- const Toolchain* toolchain() const { return toolchain_; }
-
- bool IsMac() const { return target_os_ == MAC; }
- bool IsWin() const { return target_os_ == WIN; }
-
- TargetOS target_os() const { return target_os_; }
- void set_target_os(TargetOS t) { target_os_ = t; }
-
- const OutputFile& toolchain_output_subdir() const {
- return toolchain_output_subdir_;
- }
- const SourceDir& toolchain_output_dir() const {
- return toolchain_output_dir_;
- }
-
- // Directory for generated files.
- const SourceDir& toolchain_gen_dir() const {
- return toolchain_gen_dir_;
- }
-
- // The import manager caches the result of executing imported files in the
- // context of a given settings object.
- //
- // See the ItemTree getter in GlobalSettings for why this doesn't return a
- // const pointer.
- ImportManager& import_manager() const { return import_manager_; }
-
- const Scope* base_config() const { return &base_config_; }
- Scope* base_config() { return &base_config_; }
-
- private:
- const BuildSettings* build_settings_;
-
- const Toolchain* toolchain_;
-
- TargetOS target_os_;
-
- mutable ImportManager import_manager_;
-
- // The subdirectory inside the build output for this toolchain. For the
- // default toolchain, this will be empty (since the deafult toolchain's
- // output directory is the same as the build directory). When nonempty, this
- // is guaranteed to end in a slash.
- OutputFile toolchain_output_subdir_;
-
- // Full source file path to the toolchain output directory.
- SourceDir toolchain_output_dir_;
-
- SourceDir toolchain_gen_dir_;
-
- Scope base_config_;
-
- DISALLOW_COPY_AND_ASSIGN(Settings);
-};
-
-#endif // TOOLS_GN_SETTINGS_H_