| OLD | NEW |
| 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 <iostream> | 5 #include <iostream> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Check that the deps match. | 90 // Check that the deps match. |
| 91 if (group.debug->deps().size() != group.release->deps().size()) { | 91 if (group.debug->deps().size() != group.release->deps().size()) { |
| 92 *err = Err(Location(), "The source file count for the target\n" + | 92 *err = Err(Location(), "The source file count for the target\n" + |
| 93 group.debug->label().GetUserVisibleName(true) + | 93 group.debug->label().GetUserVisibleName(true) + |
| 94 "\ndoesn't have the same number of deps between the debug and " | 94 "\ndoesn't have the same number of deps between the debug and " |
| 95 "release builds."); | 95 "release builds."); |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 for (size_t i = 0; i < group.debug->deps().size(); i++) { | 98 for (size_t i = 0; i < group.debug->deps().size(); i++) { |
| 99 if (group.debug->deps()[i]->label() != group.release->deps()[i]->label()) { | 99 if (group.debug->deps()[i].label != group.release->deps()[i].label) { |
| 100 *err = Err(Location(), "The debug and release version of the target \n" + | 100 *err = Err(Location(), "The debug and release version of the target \n" + |
| 101 group.debug->label().GetUserVisibleName(true) + | 101 group.debug->label().GetUserVisibleName(true) + |
| 102 "\ndon't agree on the dep\n" + | 102 "\ndon't agree on the dep\n" + |
| 103 group.debug->deps()[i]->label().GetUserVisibleName(true)); | 103 group.debug->deps()[i].label.GetUserVisibleName(true)); |
| 104 return false; | 104 return false; |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 return true; | 108 return true; |
| 109 } | 109 } |
| 110 | 110 |
| 111 // Python uses shlex.split, which we partially emulate here. | 111 // Python uses shlex.split, which we partially emulate here. |
| 112 // | 112 // |
| 113 // Advances to the next "word" in a GYP_DEFINES entry. This is something | 113 // Advances to the next "word" in a GYP_DEFINES entry. This is something |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 + " GN files in " + | 379 + " GN files in " + |
| 380 base::IntToString((end_time - begin_time).InMilliseconds()) + "ms\n"; | 380 base::IntToString((end_time - begin_time).InMilliseconds()) + "ms\n"; |
| 381 | 381 |
| 382 OutputString(stats); | 382 OutputString(stats); |
| 383 } | 383 } |
| 384 | 384 |
| 385 return 0; | 385 return 0; |
| 386 } | 386 } |
| 387 | 387 |
| 388 } // namespace commands | 388 } // namespace commands |
| OLD | NEW |