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

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

Issue 2198433004: Make get_label_info take into account the toolchain for target_gen_dir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused static function 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 unified diff | Download patch
« no previous file with comments | « tools/gn/ninja_utils.cc ('k') | tools/gn/substitution_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/scope_per_file_provider.h" 5 #include "tools/gn/scope_per_file_provider.h"
6 6
7 #include "tools/gn/filesystem_utils.h" 7 #include "tools/gn/filesystem_utils.h"
8 #include "tools/gn/settings.h" 8 #include "tools/gn/settings.h"
9 #include "tools/gn/source_file.h" 9 #include "tools/gn/source_file.h"
10 #include "tools/gn/value.h" 10 #include "tools/gn/value.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 nullptr, DirectoryWithNoLastSlash( 78 nullptr, DirectoryWithNoLastSlash(
79 scope_->settings()->build_settings()->build_dir()))); 79 scope_->settings()->build_settings()->build_dir())));
80 } 80 }
81 return root_build_dir_.get(); 81 return root_build_dir_.get();
82 } 82 }
83 83
84 const Value* ScopePerFileProvider::GetRootGenDir() { 84 const Value* ScopePerFileProvider::GetRootGenDir() {
85 if (!root_gen_dir_) { 85 if (!root_gen_dir_) {
86 root_gen_dir_.reset(new Value( 86 root_gen_dir_.reset(new Value(
87 nullptr, 87 nullptr,
88 DirectoryWithNoLastSlash(GetToolchainGenDir(scope_->settings())))); 88 DirectoryWithNoLastSlash(GetBuildDirAsSourceDir(
89 BuildDirContext(scope_), BuildDirType::GEN))));
89 } 90 }
90 return root_gen_dir_.get(); 91 return root_gen_dir_.get();
91 } 92 }
92 93
93 const Value* ScopePerFileProvider::GetRootOutDir() { 94 const Value* ScopePerFileProvider::GetRootOutDir() {
94 if (!root_out_dir_) { 95 if (!root_out_dir_) {
95 root_out_dir_.reset(new Value( 96 root_out_dir_.reset(new Value(
96 nullptr, 97 nullptr,
97 DirectoryWithNoLastSlash(GetToolchainOutputDir(scope_->settings())))); 98 DirectoryWithNoLastSlash(GetScopeCurrentBuildDirAsSourceDir(
99 scope_, BuildDirType::TOOLCHAIN_ROOT))));
98 } 100 }
99 return root_out_dir_.get(); 101 return root_out_dir_.get();
100 } 102 }
101 103
102 const Value* ScopePerFileProvider::GetTargetGenDir() { 104 const Value* ScopePerFileProvider::GetTargetGenDir() {
103 if (!target_gen_dir_) { 105 if (!target_gen_dir_) {
104 target_gen_dir_.reset( 106 target_gen_dir_.reset(new Value(
105 new Value(nullptr, DirectoryWithNoLastSlash(GetCurrentGenDir(scope_)))); 107 nullptr,
108 DirectoryWithNoLastSlash(
109 GetScopeCurrentBuildDirAsSourceDir(scope_, BuildDirType::GEN))));
106 } 110 }
107 return target_gen_dir_.get(); 111 return target_gen_dir_.get();
108 } 112 }
109 113
110 const Value* ScopePerFileProvider::GetTargetOutDir() { 114 const Value* ScopePerFileProvider::GetTargetOutDir() {
111 if (!target_out_dir_) { 115 if (!target_out_dir_) {
112 target_out_dir_.reset(new Value( 116 target_out_dir_.reset(new Value(
113 nullptr, DirectoryWithNoLastSlash(GetCurrentOutputDir(scope_)))); 117 nullptr,
118 DirectoryWithNoLastSlash(
119 GetScopeCurrentBuildDirAsSourceDir(scope_, BuildDirType::OBJ))));
114 } 120 }
115 return target_out_dir_.get(); 121 return target_out_dir_.get();
116 } 122 }
OLDNEW
« no previous file with comments | « tools/gn/ninja_utils.cc ('k') | tools/gn/substitution_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698