diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-10-02 21:20:40 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-10-02 22:02:51 +0200 |
commit | 0d13088ab99cf7d981932451d65034595949ebf8 (patch) | |
tree | c3e89b948afe2ac3191833d94c971a4456ccc1a1 /src/task.h | |
parent | a38c6682e4fb1f45aa1f37d10c2480aa517ea3bc (diff) |
Ensure the initial task order is preserved. Fixes bad ordering during linking.
Diffstat (limited to 'src/task.h')
-rw-r--r-- | src/task.h | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -6,7 +6,6 @@ #include <vector> #include <string> #include <atomic> -#include <set> #include <memory> #include <filesystem> @@ -28,8 +27,8 @@ public: const std::string& sourceDir); virtual ~Task() = default; - int registerDepTasks(const std::set<std::shared_ptr<Task>>& tasks); - virtual int registerDepTasksInner(const std::set<std::shared_ptr<Task>>& tasks) { return 0; } + int registerDepTasks(const std::vector<std::shared_ptr<Task>>& tasks); + virtual int registerDepTasksInner(const std::vector<std::shared_ptr<Task>>& tasks) { return 0; } bool operator==(const std::string& dep); @@ -64,7 +63,7 @@ public: ctor::output_system outputSystem() const; std::string compiler() const; - std::set<std::shared_ptr<Task>> getDependsTasks(); + std::vector<std::shared_ptr<Task>> getDependsTasks(); virtual std::string source() const { return {}; } @@ -74,7 +73,7 @@ protected: virtual bool dirtyInner() { return false; } std::vector<std::string> dependsStr; - std::set<std::shared_ptr<Task>> dependsTasks; + std::vector<std::shared_ptr<Task>> dependsTasks; const ctor::build_configuration& config; ctor::target_type target_type{ctor::target_type::automatic}; ctor::language source_language{ctor::language::automatic}; |