summaryrefslogtreecommitdiff
path: root/src/tasks.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-10-02 21:20:40 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2024-10-02 22:02:51 +0200
commit0d13088ab99cf7d981932451d65034595949ebf8 (patch)
treec3e89b948afe2ac3191833d94c971a4456ccc1a1 /src/tasks.h
parenta38c6682e4fb1f45aa1f37d10c2480aa517ea3bc (diff)
Ensure the initial task order is preserved. Fixes bad ordering during linking.
Diffstat (limited to 'src/tasks.h')
-rw-r--r--src/tasks.h17
1 files changed, 8 insertions, 9 deletions
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 <string>
-#include <set>
#include <memory>
#include <deque>
@@ -24,17 +23,17 @@ const std::deque<Target>& 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<Task> getNextTask(const std::set<std::shared_ptr<Task>>& allTasks,
- std::set<std::shared_ptr<Task>>& dirtyTasks);
+std::shared_ptr<Task> getNextTask(const std::vector<std::shared_ptr<Task>>& allTasks,
+ std::vector<std::shared_ptr<Task>>& dirtyTasks);
//! Get list of tasks filtered by name including each of their direct
//! dependency tasks (ie. objects tasks from their sources).
-std::set<std::shared_ptr<Task>> getTasks(const ctor::settings& settings,
- const std::vector<std::string> names = {},
- bool resolve_externals = true);
+std::vector<std::shared_ptr<Task>> getTasks(const ctor::settings& settings,
+ const std::vector<std::string> 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<std::shared_ptr<Task>> taskFactory(const ctor::build_configuration& config,
- const ctor::settings& settings,
- const std::string& sourceDir);
+std::vector<std::shared_ptr<Task>> taskFactory(const ctor::build_configuration& config,
+ const ctor::settings& settings,
+ const std::string& sourceDir);