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

Unified Diff: tools/gn/function_toolchain.cc

Issue 2240293002: Remove GN back-compat toolchain args code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/functions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_toolchain.cc
diff --git a/tools/gn/function_toolchain.cc b/tools/gn/function_toolchain.cc
index 69ca961cfdae0a5c1707ef7c45e3a8dd0ca6a34d..2335ac696e5af5e730fb8803d7a5b1cdc854125f 100644
--- a/tools/gn/function_toolchain.cc
+++ b/tools/gn/function_toolchain.cc
@@ -1042,46 +1042,4 @@ Value RunTool(Scope* scope,
return Value();
}
-extern const char kToolchainArgs[] = "toolchain_args";
scottmg 2016/08/12 20:04:24 Oh, those extern's were weird. I'm surprised that
-extern const char kToolchainArgs_HelpShort[] =
- "toolchain_args: Set build arguments for toolchain build setup.";
-extern const char kToolchainArgs_Help[] =
- "toolchain_args: Set build arguments for toolchain build setup.\n"
- "\n"
- " DEPRECATED. Instead use:\n"
- " toolchain_args = { ... }\n"
- "\n"
- " See \"gn help toolchain\" for documentation.\n";
-
-Value RunToolchainArgs(Scope* scope,
- const FunctionCallNode* function,
- const std::vector<Value>& args,
- BlockNode* block,
- Err* err) {
- // This is a backwards-compatible shim that converts the old form of:
- // toolchain_args() {
- // foo = bar
- // }
- // to the new form:
- // toolchain_args = {
- // foo = bar
- // }
- // It will be deleted when all users of toolchain_args as a function are
- // deleted.
- if (!args.empty()) {
- *err = Err(function->function(), "This function takes no arguments.");
- return Value();
- }
-
- std::unique_ptr<Scope> block_scope(new Scope(scope));
- block->Execute(block_scope.get(), err);
- if (err->has_error())
- return Value();
-
- block_scope->DetachFromContaining();
- scope->SetValue("toolchain_args", Value(function, std::move(block_scope)),
- function);
- return Value();
-}
-
} // namespace functions
« no previous file with comments | « no previous file | tools/gn/functions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698