Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: tools/gn/settings.cc

Issue 21114002: Add initial prototype for the GN meta-buildsystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add owners and readme Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/settings.h ('k') | tools/gn/setup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/settings.cc
diff --git a/tools/gn/settings.cc b/tools/gn/settings.cc
new file mode 100644
index 0000000000000000000000000000000000000000..82014a7d779fe359488996742405fa2f990d43a7
--- /dev/null
+++ b/tools/gn/settings.cc
@@ -0,0 +1,38 @@
+// 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 "tools/gn/settings.h"
+
+#include "base/logging.h"
+#include "tools/gn/filesystem_utils.h"
+
+Settings::Settings(const BuildSettings* build_settings,
+ const Toolchain* toolchain,
+ const std::string& output_subdir_name)
+ : build_settings_(build_settings),
+ toolchain_(toolchain),
+ target_os_(WIN), // FIXME(brettw) set this properly.
+ import_manager_(),
+ base_config_(this) {
+ DCHECK(output_subdir_name.find('/') == std::string::npos);
+ if (output_subdir_name.empty()) {
+ toolchain_output_dir_ = build_settings->build_dir();
+ } else {
+ // We guarantee this ends in a slash.
+ toolchain_output_subdir_.value().append(output_subdir_name);
+ toolchain_output_subdir_.value().push_back('/');
+
+ toolchain_output_dir_ = SourceDir(build_settings->build_dir().value() +
+ toolchain_output_subdir_.value());
+ }
+ // The output dir will be null in some tests and when invoked to parsed
+ // one-off data without doing generation.
+ if (!toolchain_output_dir_.is_null())
+ toolchain_gen_dir_ = SourceDir(toolchain_output_dir_.value() + "gen/");
+}
+
+Settings::~Settings() {
+}
+
+
« no previous file with comments | « tools/gn/settings.h ('k') | tools/gn/setup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698