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

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

Issue 1368223002: [GN]: BUILD file housecleaning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « build/toolchain/win/BUILD.gn ('k') | no next file » | 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/ninja_binary_target_writer.h" 5 #include "tools/gn/ninja_binary_target_writer.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <set> 8 #include <set>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 413 }
414 414
415 bool has_precompiled_headers = 415 bool has_precompiled_headers =
416 target_->config_values().has_precompiled_headers(); 416 target_->config_values().has_precompiled_headers();
417 417
418 EscapeOptions opts = GetFlagOptions(); 418 EscapeOptions opts = GetFlagOptions();
419 if (used_types.Get(SOURCE_S) || used_types.Get(SOURCE_ASM)) { 419 if (used_types.Get(SOURCE_S) || used_types.Get(SOURCE_ASM)) {
420 WriteOneFlag(SUBSTITUTION_ASMFLAGS, false, Toolchain::TYPE_NONE, 420 WriteOneFlag(SUBSTITUTION_ASMFLAGS, false, Toolchain::TYPE_NONE,
421 &ConfigValues::asmflags, opts); 421 &ConfigValues::asmflags, opts);
422 } 422 }
423 // TODO(andybons): Remove SOURCE_S and SOURCE_ASM checks once asmflags is
424 // used.
425 if (used_types.Get(SOURCE_C) || used_types.Get(SOURCE_CPP) || 423 if (used_types.Get(SOURCE_C) || used_types.Get(SOURCE_CPP) ||
426 used_types.Get(SOURCE_M) || used_types.Get(SOURCE_MM) || 424 used_types.Get(SOURCE_M) || used_types.Get(SOURCE_MM)) {
427 used_types.Get(SOURCE_S) || used_types.Get(SOURCE_ASM)) {
428 WriteOneFlag(SUBSTITUTION_CFLAGS, false, Toolchain::TYPE_NONE, 425 WriteOneFlag(SUBSTITUTION_CFLAGS, false, Toolchain::TYPE_NONE,
429 &ConfigValues::cflags, opts); 426 &ConfigValues::cflags, opts);
430 } 427 }
431 if (used_types.Get(SOURCE_C) || used_types.Get(SOURCE_S) || 428 if (used_types.Get(SOURCE_C)) {
432 used_types.Get(SOURCE_ASM)) {
433 WriteOneFlag(SUBSTITUTION_CFLAGS_C, has_precompiled_headers, 429 WriteOneFlag(SUBSTITUTION_CFLAGS_C, has_precompiled_headers,
434 Toolchain::TYPE_CC, &ConfigValues::cflags_c, opts); 430 Toolchain::TYPE_CC, &ConfigValues::cflags_c, opts);
435 } 431 }
436 if (used_types.Get(SOURCE_CPP)) { 432 if (used_types.Get(SOURCE_CPP)) {
437 WriteOneFlag(SUBSTITUTION_CFLAGS_CC, has_precompiled_headers, 433 WriteOneFlag(SUBSTITUTION_CFLAGS_CC, has_precompiled_headers,
438 Toolchain::TYPE_CXX, &ConfigValues::cflags_cc, opts); 434 Toolchain::TYPE_CXX, &ConfigValues::cflags_cc, opts);
439 } 435 }
440 if (used_types.Get(SOURCE_M)) { 436 if (used_types.Get(SOURCE_M)) {
441 WriteOneFlag(SUBSTITUTION_CFLAGS_OBJC, has_precompiled_headers, 437 WriteOneFlag(SUBSTITUTION_CFLAGS_OBJC, has_precompiled_headers,
442 Toolchain::TYPE_OBJC, &ConfigValues::cflags_objc, opts); 438 Toolchain::TYPE_OBJC, &ConfigValues::cflags_objc, opts);
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 "\n" 1028 "\n"
1033 "In the latter case, either rename one of the files or move one of\n" 1029 "In the latter case, either rename one of the files or move one of\n"
1034 "the sources to a separate source_set to avoid them both being in\n" 1030 "the sources to a separate source_set to avoid them both being in\n"
1035 "the same target."); 1031 "the same target.");
1036 g_scheduler->FailWithError(err); 1032 g_scheduler->FailWithError(err);
1037 return false; 1033 return false;
1038 } 1034 }
1039 } 1035 }
1040 return true; 1036 return true;
1041 } 1037 }
OLDNEW
« no previous file with comments | « build/toolchain/win/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698