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

Unified Diff: tools/gn/ninja_binary_target_writer_unittest.cc

Issue 1316653003: GN get_label_info support toolchains for target_out_dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/function_get_label_info_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_binary_target_writer_unittest.cc
diff --git a/tools/gn/ninja_binary_target_writer_unittest.cc b/tools/gn/ninja_binary_target_writer_unittest.cc
index 5438c4dc6bd463db230cf98c94ad79bfb30fa81c..16f75893c03e776196767f7a148062dfe2219d24 100644
--- a/tools/gn/ninja_binary_target_writer_unittest.cc
+++ b/tools/gn/ninja_binary_target_writer_unittest.cc
@@ -375,6 +375,8 @@ TEST(NinjaBinaryTargetWriter, WinPrecompiledHeaders) {
Settings pch_settings(setup.build_settings(), "withpch/");
Toolchain pch_toolchain(&pch_settings,
Label(SourceDir("//toolchain/"), "withpch"));
+ pch_settings.set_toolchain_label(pch_toolchain.label());
+ pch_settings.set_default_toolchain_label(setup.toolchain()->label());
// Declare a C++ compiler that supports PCH.
scoped_ptr<Tool> cxx_tool(new Tool);
@@ -410,10 +412,10 @@ TEST(NinjaBinaryTargetWriter, WinPrecompiledHeaders) {
"target_output_name = no_pch_target\n"
"\n"
"build withpch/obj/foo/no_pch_target.input1.o: "
- "cxx ../../foo/input1.cc\n"
+ "withpch_cxx ../../foo/input1.cc\n"
"\n"
"build withpch/obj/foo/no_pch_target.stamp: "
- "stamp withpch/obj/foo/no_pch_target.input1.o\n";
+ "withpch_stamp withpch/obj/foo/no_pch_target.input1.o\n";
EXPECT_EQ(no_pch_expected, out.str());
}
@@ -445,16 +447,16 @@ TEST(NinjaBinaryTargetWriter, WinPrecompiledHeaders) {
"\n"
// Compile the precompiled source file with /Yc.
"build withpch/obj/build/pch_target.precompile.cc.o: "
- "cxx ../../build/precompile.cc\n"
+ "withpch_cxx ../../build/precompile.cc\n"
" cflags_cc = ${cflags_cc} /Ycbuild/precompile.h\n"
"\n"
"build withpch/obj/foo/pch_target.input1.o: "
- "cxx ../../foo/input1.cc | "
+ "withpch_cxx ../../foo/input1.cc | "
// Explicit dependency on the PCH build step.
"withpch/obj/build/pch_target.precompile.cc.o\n"
"\n"
"build withpch/obj/foo/pch_target.stamp: "
- "stamp withpch/obj/foo/pch_target.input1.o "
+ "withpch_stamp withpch/obj/foo/pch_target.input1.o "
// The precompiled object file was added to the outputs.
"withpch/obj/build/pch_target.precompile.cc.o\n";
EXPECT_EQ(pch_win_expected, out.str());
« no previous file with comments | « tools/gn/function_get_label_info_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698