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

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

Issue 1892393002: 🐜 GN: Make write_runtime_deps take effect only a target is resolved (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 4 years, 8 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 | « tools/gn/runtime_deps_unittest.cc ('k') | tools/gn/target_generator.cc » ('j') | 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/target.h" 5 #include "tools/gn/target.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return false; 317 return false;
318 if (!CheckTestonly(err)) 318 if (!CheckTestonly(err))
319 return false; 319 return false;
320 if (!CheckNoNestedStaticLibs(err)) 320 if (!CheckNoNestedStaticLibs(err))
321 return false; 321 return false;
322 if (!CheckAssertNoDeps(err)) 322 if (!CheckAssertNoDeps(err))
323 return false; 323 return false;
324 CheckSourcesGenerated(); 324 CheckSourcesGenerated();
325 } 325 }
326 326
327 if (!write_runtime_deps_output_.value().empty())
328 g_scheduler->AddWriteRuntimeDepsTarget(this);
329
327 return true; 330 return true;
328 } 331 }
329 332
330 bool Target::IsBinary() const { 333 bool Target::IsBinary() const {
331 return output_type_ == EXECUTABLE || 334 return output_type_ == EXECUTABLE ||
332 output_type_ == SHARED_LIBRARY || 335 output_type_ == SHARED_LIBRARY ||
333 output_type_ == LOADABLE_MODULE || 336 output_type_ == LOADABLE_MODULE ||
334 output_type_ == STATIC_LIBRARY || 337 output_type_ == STATIC_LIBRARY ||
335 output_type_ == SOURCE_SET; 338 output_type_ == SOURCE_SET;
336 } 339 }
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); 782 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file);
780 // Check object files (much slower and very rare) only if the "normal" 783 // Check object files (much slower and very rare) only if the "normal"
781 // output check failed. 784 // output check failed.
782 consider_object_files = !check_data_deps; 785 consider_object_files = !check_data_deps;
783 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, 786 if (!EnsureFileIsGeneratedByDependency(this, out_file, true,
784 consider_object_files, 787 consider_object_files,
785 check_data_deps, &seen_targets)) 788 check_data_deps, &seen_targets))
786 g_scheduler->AddUnknownGeneratedInput(this, source); 789 g_scheduler->AddUnknownGeneratedInput(this, source);
787 } 790 }
788 } 791 }
OLDNEW
« no previous file with comments | « tools/gn/runtime_deps_unittest.cc ('k') | tools/gn/target_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698