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 "base/sys_info.h" | 7 #include "base/sys_info.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "tools/gn/variables.h" | 9 #include "tools/gn/variables.h" |
10 | 10 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 // Host OS. | 251 // Host OS. |
252 const char* os = nullptr; | 252 const char* os = nullptr; |
253 #if defined(OS_WIN) | 253 #if defined(OS_WIN) |
254 os = "win"; | 254 os = "win"; |
255 #elif defined(OS_MACOSX) | 255 #elif defined(OS_MACOSX) |
256 os = "mac"; | 256 os = "mac"; |
257 #elif defined(OS_LINUX) | 257 #elif defined(OS_LINUX) |
258 os = "linux"; | 258 os = "linux"; |
259 #elif defined(OS_ANDROID) | 259 #elif defined(OS_ANDROID) |
260 os = "android"; | 260 os = "android"; |
| 261 #elif defined(OS_NETBSD) |
| 262 os = "netbsd"; |
261 #else | 263 #else |
262 #error Unknown OS type. | 264 #error Unknown OS type. |
263 #endif | 265 #endif |
264 | 266 |
265 // Host architecture. | 267 // Host architecture. |
266 static const char kX86[] = "x86"; | 268 static const char kX86[] = "x86"; |
267 static const char kX64[] = "x64"; | 269 static const char kX64[] = "x64"; |
268 static const char kArm[] = "arm"; | 270 static const char kArm[] = "arm"; |
269 static const char kMips[] = "mipsel"; | 271 static const char kMips[] = "mipsel"; |
270 const char* arch = nullptr; | 272 const char* arch = nullptr; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 Scope* scope) const { | 348 Scope* scope) const { |
347 lock_.AssertAcquired(); | 349 lock_.AssertAcquired(); |
348 return declared_arguments_per_toolchain_[scope->settings()]; | 350 return declared_arguments_per_toolchain_[scope->settings()]; |
349 } | 351 } |
350 | 352 |
351 Scope::KeyValueMap& Args::OverridesForToolchainLocked( | 353 Scope::KeyValueMap& Args::OverridesForToolchainLocked( |
352 Scope* scope) const { | 354 Scope* scope) const { |
353 lock_.AssertAcquired(); | 355 lock_.AssertAcquired(); |
354 return toolchain_overrides_[scope->settings()]; | 356 return toolchain_overrides_[scope->settings()]; |
355 } | 357 } |
OLD | NEW |