OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |