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

Unified Diff: tools/gn/ninja_binary_target_writer_unittest.cc

Issue 1359243002: [GN]: Fix bug where cflag vars were not being written on non-PCH builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/ninja_binary_target_writer.cc ('k') | tools/gn/variables.h » ('j') | 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 4bb055337d31ff260d459c7c5a6492a0d5a393a2..25d4782eef86c0802f5669f98a495ef09a5c566f 100644
--- a/tools/gn/ninja_binary_target_writer_unittest.cc
+++ b/tools/gn/ninja_binary_target_writer_unittest.cc
@@ -409,6 +409,7 @@ TEST(NinjaBinaryTargetWriter, WinPrecompiledHeaders) {
no_pch_target.visibility().SetPublic();
no_pch_target.sources().push_back(SourceFile("//foo/input1.cc"));
no_pch_target.sources().push_back(SourceFile("//foo/input2.c"));
+ no_pch_target.config_values().cflags_c().push_back("-std=c99");
no_pch_target.SetToolchain(&pch_toolchain);
ASSERT_TRUE(no_pch_target.OnResolved(&err));
@@ -420,7 +421,7 @@ TEST(NinjaBinaryTargetWriter, WinPrecompiledHeaders) {
"defines =\n"
"include_dirs =\n"
"cflags =\n"
- "cflags_c =\n"
+ "cflags_c = -std=c99\n"
"cflags_cc =\n"
"target_output_name = no_pch_target\n"
"\n"
@@ -537,6 +538,7 @@ TEST(NinjaBinaryTargetWriter, GCCPrecompiledHeaders) {
no_pch_target.visibility().SetPublic();
no_pch_target.sources().push_back(SourceFile("//foo/input1.cc"));
no_pch_target.sources().push_back(SourceFile("//foo/input2.c"));
+ no_pch_target.config_values().cflags_c().push_back("-std=c99");
no_pch_target.SetToolchain(&pch_toolchain);
ASSERT_TRUE(no_pch_target.OnResolved(&err));
@@ -548,7 +550,7 @@ TEST(NinjaBinaryTargetWriter, GCCPrecompiledHeaders) {
"defines =\n"
"include_dirs =\n"
"cflags =\n"
- "cflags_c =\n"
+ "cflags_c = -std=c99\n"
"cflags_cc =\n"
"target_output_name = no_pch_target\n"
"\n"
« no previous file with comments | « tools/gn/ninja_binary_target_writer.cc ('k') | tools/gn/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698