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

Unified Diff: tools/gn/visual_studio_writer.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/target.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/visual_studio_writer.cc
diff --git a/tools/gn/visual_studio_writer.cc b/tools/gn/visual_studio_writer.cc
index fb6d923db0a02ec61d669ca8c1d33db62294defc..870d96c35c6bc82c8c3e9e4a61f9668291272e91 100644
--- a/tools/gn/visual_studio_writer.cc
+++ b/tools/gn/visual_studio_writer.cc
@@ -337,8 +337,9 @@ bool VisualStudioWriter::WriteProjectFiles(const Target* target, Err* err) {
project_config_platform = "Win32";
}
- SourceFile target_file = GetTargetOutputDir(target).ResolveRelativeFile(
- Value(nullptr, project_name + ".vcxproj"), err);
+ SourceFile target_file =
+ GetBuildDirForTargetAsSourceDir(target, BuildDirType::OBJ)
+ .ResolveRelativeFile(Value(nullptr, project_name + ".vcxproj"), err);
if (target_file.is_null())
return false;
@@ -377,9 +378,9 @@ bool VisualStudioWriter::WriteProjectFileContents(
const Target* target,
SourceFileCompileTypePairs* source_types,
Err* err) {
- PathOutput path_output(GetTargetOutputDir(target),
- build_settings_->root_path_utf8(),
- EscapingMode::ESCAPE_NONE);
+ PathOutput path_output(
+ GetBuildDirForTargetAsSourceDir(target, BuildDirType::OBJ),
+ build_settings_->root_path_utf8(), EscapingMode::ESCAPE_NONE);
out << "<?xml version=\"1.0\" encoding=\"utf-8\"?>" << std::endl;
XmlElementWriter project(
@@ -612,9 +613,9 @@ void VisualStudioWriter::WriteFiltersFileContents(
// File paths are relative to vcxproj files which are generated to out dirs.
// Filters tree structure need to reflect source directories and be relative
// to target file. We need two path outputs then.
- PathOutput file_path_output(GetTargetOutputDir(target),
- build_settings_->root_path_utf8(),
- EscapingMode::ESCAPE_NONE);
+ PathOutput file_path_output(
+ GetBuildDirForTargetAsSourceDir(target, BuildDirType::OBJ),
+ build_settings_->root_path_utf8(), EscapingMode::ESCAPE_NONE);
PathOutput filter_path_output(target->label().dir(),
build_settings_->root_path_utf8(),
EscapingMode::ESCAPE_NONE);
« no previous file with comments | « tools/gn/target.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698