| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "tools/gn/err.h" | 8 #include "tools/gn/err.h" |
| 9 #include "tools/gn/functions.h" | 9 #include "tools/gn/functions.h" |
| 10 #include "tools/gn/parse_tree.h" | 10 #include "tools/gn/parse_tree.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 " is_32bit = true\n" | 294 " is_32bit = true\n" |
| 295 " is_64bit = false\n" | 295 " is_64bit = false\n" |
| 296 " }\n" | 296 " }\n" |
| 297 " }\n"; | 297 " }\n"; |
| 298 | 298 |
| 299 Value RunToolchain(Scope* scope, | 299 Value RunToolchain(Scope* scope, |
| 300 const FunctionCallNode* function, | 300 const FunctionCallNode* function, |
| 301 const std::vector<Value>& args, | 301 const std::vector<Value>& args, |
| 302 BlockNode* block, | 302 BlockNode* block, |
| 303 Err* err) { | 303 Err* err) { |
| 304 NonNestableBlock non_nestable(scope, function, "toolchain"); |
| 305 if (!non_nestable.Enter(err)) |
| 306 return Value(); |
| 307 |
| 304 if (!EnsureNotProcessingImport(function, scope, err) || | 308 if (!EnsureNotProcessingImport(function, scope, err) || |
| 305 !EnsureNotProcessingBuildConfig(function, scope, err)) | 309 !EnsureNotProcessingBuildConfig(function, scope, err)) |
| 306 return Value(); | 310 return Value(); |
| 307 | 311 |
| 308 // Note that we don't want to use MakeLabelForScope since that will include | 312 // Note that we don't want to use MakeLabelForScope since that will include |
| 309 // the toolchain name in the label, and toolchain labels don't themselves | 313 // the toolchain name in the label, and toolchain labels don't themselves |
| 310 // have toolchain names. | 314 // have toolchain names. |
| 311 const SourceDir& input_dir = scope->GetSourceDir(); | 315 const SourceDir& input_dir = scope->GetSourceDir(); |
| 312 Label label(input_dir, args[0].string_value()); | 316 Label label(input_dir, args[0].string_value()); |
| 313 if (g_scheduler->verbose_logging()) | 317 if (g_scheduler->verbose_logging()) |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 return Value(); | 949 return Value(); |
| 946 | 950 |
| 947 Scope::KeyValueMap values; | 951 Scope::KeyValueMap values; |
| 948 block_scope.GetCurrentScopeValues(&values); | 952 block_scope.GetCurrentScopeValues(&values); |
| 949 toolchain->args() = values; | 953 toolchain->args() = values; |
| 950 | 954 |
| 951 return Value(); | 955 return Value(); |
| 952 } | 956 } |
| 953 | 957 |
| 954 } // namespace functions | 958 } // namespace functions |
| OLD | NEW |