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

Side by Side Diff: tools/gn/function_set_default_toolchain.cc

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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/build_settings.h" 5 #include "tools/gn/build_settings.h"
6 #include "tools/gn/functions.h" 6 #include "tools/gn/functions.h"
7 #include "tools/gn/loader.h" 7 #include "tools/gn/loader.h"
8 #include "tools/gn/parse_tree.h" 8 #include "tools/gn/parse_tree.h"
9 #include "tools/gn/scope.h" 9 #include "tools/gn/scope.h"
10 #include "tools/gn/settings.h" 10 #include "tools/gn/settings.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 scope->GetProperty(Loader::kDefaultToolchainKey, NULL)); 60 scope->GetProperty(Loader::kDefaultToolchainKey, NULL));
61 if (!default_toolchain_dest) 61 if (!default_toolchain_dest)
62 return Value(); 62 return Value();
63 63
64 const SourceDir& current_dir = scope->GetSourceDir(); 64 const SourceDir& current_dir = scope->GetSourceDir();
65 const Label& default_toolchain = ToolchainLabelForScope(scope); 65 const Label& default_toolchain = ToolchainLabelForScope(scope);
66 66
67 if (!EnsureSingleStringArg(function, args, err)) 67 if (!EnsureSingleStringArg(function, args, err))
68 return Value(); 68 return Value();
69 Label toolchain_label( 69 Label toolchain_label(
70 Label::Resolve(current_dir, default_toolchain, args[0], err)); 70 Label::Resolve(current_dir, default_toolchain, args[0],
71 scope->settings()->build_settings()->root_path(), err));
71 if (toolchain_label.is_null()) 72 if (toolchain_label.is_null())
72 return Value(); 73 return Value();
73 74
74 *default_toolchain_dest = toolchain_label; 75 *default_toolchain_dest = toolchain_label;
75 return Value(); 76 return Value();
76 } 77 }
77 78
78 } // namespace functions 79 } // namespace functions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698