| Index: tools/gn/function_set_default_toolchain.cc
|
| diff --git a/tools/gn/function_set_default_toolchain.cc b/tools/gn/function_set_default_toolchain.cc
|
| index b9d31099cdb8b052a8fa13f8bd24dd2b5e4c6655..f04cba88031d73752174c483755585fcad4090a3 100644
|
| --- a/tools/gn/function_set_default_toolchain.cc
|
| +++ b/tools/gn/function_set_default_toolchain.cc
|
| @@ -41,7 +41,15 @@ Argument
|
|
|
| Example
|
|
|
| - set_default_toolchain("//build/config/win:vs32"))";
|
| + # Set default toolchain only has an effect when run in the context of the
|
| + # default toolchain. Pick the right one according to the current CPU
|
| + # architecture.
|
| + if (target_cpu == "x64") {
|
| + set_default_toolchain("//toolchains:64")
|
| + } else if (target_cpu == "x86") {
|
| + set_default_toolchain("//toolchains:32")
|
| + }
|
| +)";
|
|
|
| Value RunSetDefaultToolchain(Scope* scope,
|
| const FunctionCallNode* function,
|
|
|