1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef TOOLS_GN_METADATAWALK_H_ 6 #define TOOLS_GN_METADATAWALK_H_ 7 8 #include "gn/build_settings.h" 9 #include "gn/target.h" 10 #include "gn/unique_vector.h" 11 #include "gn/value.h" 12 13 // Function to collect metadata from resolved targets listed in targets_walked. 14 // Intended to be called after all targets are resolved. 15 // 16 // This populates targets_walked with all targets touched by this walk, and 17 // returns the list of metadata values. 18 std::vector<Value> WalkMetadata( 19 const UniqueVector<const Target*>& targets_to_walk, 20 const std::vector<std::string>& keys_to_extract, 21 const std::vector<std::string>& keys_to_walk, 22 const SourceDir& rebase_dir, 23 TargetSet* targets_walked, 24 Err* err); 25 26 #endif // TOOLS_GN_METADATAWALK_H_ 27