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

Unified Diff: tools/gn/ninja_build_writer.cc

Issue 21983003: Make the Mac build work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dunnow Created 7 years, 4 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/input_file_manager.cc ('k') | tools/gn/ninja_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_build_writer.cc
diff --git a/tools/gn/ninja_build_writer.cc b/tools/gn/ninja_build_writer.cc
index a63765cd3aafadcb7d785d3a53db279a54456b7c..c41422b1db41d0c565ca1d9fb6978073ad51cbc9 100644
--- a/tools/gn/ninja_build_writer.cc
+++ b/tools/gn/ninja_build_writer.cc
@@ -12,6 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "tools/gn/build_settings.h"
+#include "tools/gn/escape.h"
#include "tools/gn/filesystem_utils.h"
#include "tools/gn/input_file_manager.h"
#include "tools/gn/scheduler.h"
@@ -31,7 +32,7 @@ std::string GetSelfInvocationCommand(const BuildSettings* build_settings) {
base::FilePath executable(module);
#elif defined(OS_MACOSX)
// FIXME(brettw) write this on Mac!
- base::FilePath executable("gn");
+ base::FilePath executable("../Debug/gn");
#else
base::FilePath executable =
base::GetProcessExecutablePath(base::GetCurrentProcessHandle());
@@ -108,12 +109,12 @@ void NinjaBuildWriter::WriteNinjaRules() {
out_ << "build build.ninja: gn";
// Input build files.
- std::vector<SourceFile> input_files;
- g_scheduler->input_file_manager()->GetAllInputFileNames(&input_files);
- for (size_t i = 0; i < input_files.size(); i++) {
- out_ << " ";
- path_output_.WriteFile(out_, input_files[i]);
- }
+ std::vector<base::FilePath> input_files;
+ g_scheduler->input_file_manager()->GetAllPhysicalInputFileNames(&input_files);
+ EscapeOptions ninja_options;
+ ninja_options.mode = ESCAPE_NINJA;
+ for (size_t i = 0; i < input_files.size(); i++)
+ out_ << " " << EscapeString(FilePathToUTF8(input_files[i]), ninja_options);
// Other files read by the build.
std::vector<SourceFile> other_files = g_scheduler->GetGenDependencies();
« no previous file with comments | « tools/gn/input_file_manager.cc ('k') | tools/gn/ninja_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698