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

Side by Side Diff: tools/gn/args.cc

Issue 180743014: Allow the bootstrap binary of GN (the one in TEMPDIR) to build and run on FreeBSD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Submit a clean patch. Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/bootstrap/bootstrap.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/args.h" 5 #include "tools/gn/args.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "tools/gn/variables.h" 8 #include "tools/gn/variables.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 lock_.AssertAcquired(); 202 lock_.AssertAcquired();
203 203
204 // Host OS. 204 // Host OS.
205 const char* os = NULL; 205 const char* os = NULL;
206 #if defined(OS_WIN) 206 #if defined(OS_WIN)
207 os = "win"; 207 os = "win";
208 #elif defined(OS_MACOSX) 208 #elif defined(OS_MACOSX)
209 os = "mac"; 209 os = "mac";
210 #elif defined(OS_LINUX) 210 #elif defined(OS_LINUX)
211 os = "linux"; 211 os = "linux";
212 #elif defined(OS_FREEBSD)
213 os = "freebsd";
212 #else 214 #else
213 #error Unknown OS type. 215 #error Unknown OS type.
214 #endif 216 #endif
215 Value os_val(NULL, std::string(os)); 217 Value os_val(NULL, std::string(os));
216 dest->SetValue(variables::kBuildOs, os_val, NULL); 218 dest->SetValue(variables::kBuildOs, os_val, NULL);
217 dest->SetValue(variables::kOs, os_val, NULL); 219 dest->SetValue(variables::kOs, os_val, NULL);
218 220
219 // Host architecture. 221 // Host architecture.
220 static const char kX86[] = "x86"; 222 static const char kX86[] = "x86";
221 static const char kX64[] = "x64"; 223 static const char kX64[] = "x64";
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 i != values.end(); ++i) 280 i != values.end(); ++i)
279 scope->SetValue(i->first, i->second, i->second.origin()); 281 scope->SetValue(i->first, i->second, i->second.origin());
280 } 282 }
281 283
282 void Args::SaveOverrideRecordLocked(const Scope::KeyValueMap& values) const { 284 void Args::SaveOverrideRecordLocked(const Scope::KeyValueMap& values) const {
283 lock_.AssertAcquired(); 285 lock_.AssertAcquired();
284 for (Scope::KeyValueMap::const_iterator i = values.begin(); 286 for (Scope::KeyValueMap::const_iterator i = values.begin();
285 i != values.end(); ++i) 287 i != values.end(); ++i)
286 all_overrides_[i->first] = i->second; 288 all_overrides_[i->first] = i->second;
287 } 289 }
OLDNEW
« no previous file with comments | « no previous file | tools/gn/bootstrap/bootstrap.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698