From 0008920eed996009068fe9f71512c436577b6220 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 2 Oct 2024 21:20:40 +0200 Subject: Ensure the initial task order is preserved. Fixes bad ordering during linking. --- src/tasks.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/tasks.h') diff --git a/src/tasks.h b/src/tasks.h index ed1bf60..cc34f56 100644 --- a/src/tasks.h +++ b/src/tasks.h @@ -4,7 +4,6 @@ #pragma once #include -#include #include #include @@ -24,17 +23,17 @@ const std::deque& getTargets(const ctor::settings& settings, //! fulfilled. //! The returned task is removed from the dirty list. //! Return nullptr if no dirty task is ready. -std::shared_ptr getNextTask(const std::set>& allTasks, - std::set>& dirtyTasks); +std::shared_ptr getNextTask(const std::vector>& allTasks, + std::vector>& dirtyTasks); //! Get list of tasks filtered by name including each of their direct //! dependency tasks (ie. objects tasks from their sources). -std::set> getTasks(const ctor::settings& settings, - const std::vector names = {}, - bool resolve_externals = true); +std::vector> getTasks(const ctor::settings& settings, + const std::vector names = {}, + bool resolve_externals = true); //! Generate list of targets from a single configuration, including the final //! link target and all its objects files (if any). -std::set> taskFactory(const ctor::build_configuration& config, - const ctor::settings& settings, - const std::string& sourceDir); +std::vector> taskFactory(const ctor::build_configuration& config, + const ctor::settings& settings, + const std::string& sourceDir); -- cgit v1.2.3