Index: tools/gn/function_toolchain.cc |
diff --git a/tools/gn/function_toolchain.cc b/tools/gn/function_toolchain.cc |
index 2fe5f53a23c5135918262ed2b0a7cea3f9fa7378..4e1fe2d418e684c07616a352b3689b66e2642c7b 100644 |
--- a/tools/gn/function_toolchain.cc |
+++ b/tools/gn/function_toolchain.cc |
@@ -301,6 +301,10 @@ Value RunToolchain(Scope* scope, |
const std::vector<Value>& args, |
BlockNode* block, |
Err* err) { |
+ NonNestableBlock non_nestable(scope, function, "toolchain"); |
+ if (!non_nestable.Enter(err)) |
+ return Value(); |
+ |
if (!EnsureNotProcessingImport(function, scope, err) || |
!EnsureNotProcessingBuildConfig(function, scope, err)) |
return Value(); |