diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-13 18:24:16 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-13 18:24:16 +0200 |
commit | 19195e2bbdcd7a0db8f84732ce54b1c9d07c006c (patch) | |
tree | b974b648ebacd645fbee000575268326f3b7bfbc /task_ld.h | |
parent | f6f5f31067cdee2d7003d8209361ac9e5b6975c5 (diff) |
Make task an abstract class and make CC and LD versions of it.
Diffstat (limited to 'task_ld.h')
-rw-r--r-- | task_ld.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/task_ld.h b/task_ld.h new file mode 100644 index 0000000..709f238 --- /dev/null +++ b/task_ld.h @@ -0,0 +1,38 @@ +// -*- c++ -*- +#pragma once + +#include "task.h" + +#include <vector> +#include <string> +#include <future> +#include <filesystem> + +struct BuildConfiguration; +struct Settings; + +class TaskLD + : public Task +{ +public: + TaskLD(const BuildConfiguration& config, + const Settings& settings, + const std::string& target, + const std::vector<std::string>& objects); + + bool dirty() override; + + int run() override; + int clean() override; + + std::vector<std::string> depends() const override; + + std::string target() const override; + +private: + std::vector<std::filesystem::path> objectFiles; + std::filesystem::path targetFile; + + const BuildConfiguration& config; + const Settings& settings; +}; |