summaryrefslogtreecommitdiff
path: root/task_ld.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 18:24:16 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 18:24:16 +0200
commit19195e2bbdcd7a0db8f84732ce54b1c9d07c006c (patch)
treeb974b648ebacd645fbee000575268326f3b7bfbc /task_ld.h
parentf6f5f31067cdee2d7003d8209361ac9e5b6975c5 (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.h38
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;
+};