diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2022-08-19 18:09:25 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2022-08-19 18:09:25 +0200 |
commit | 7436d83ef371d4fee4a66bec235e102ed80275db (patch) | |
tree | 243b416b1b6e10a43b9495121af0e57522543de0 /src/task.cc | |
parent | e1030dc6e69863438fe35a628bd6af9abc814b4a (diff) |
Add support for msvc tool-chain (cl.exe/link.exe and lib.exe) on windows.
Diffstat (limited to 'src/task.cc')
-rw-r--r-- | src/task.cc | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/task.cc b/src/task.cc index fb50765..4736565 100644 --- a/src/task.cc +++ b/src/task.cc @@ -3,7 +3,7 @@ // See accompanying file LICENSE for details. #include "task.h" -#include <unistd.h> +//#include <unistd.h> #include <iostream> Task::Task(const BuildConfiguration& config, const Settings& settings, @@ -147,11 +147,24 @@ std::string Task::compiler() const case OutputSystem::Build: return getConfiguration(cfg::build_cxx, "/usr/bin/g++"); } - default: - std::cerr << "Unknown CC target type\n"; - exit(1); - break; } + + std::cerr << "Unknown CC target type\n"; + exit(1); +} + +std::string Task::linker() const +{ + switch(outputSystem()) + { + case OutputSystem::Host: + return getConfiguration(cfg::host_ld, "/usr/bin/ld"); + case OutputSystem::Build: + return getConfiguration(cfg::build_ld, "/usr/bin/ld"); + } + + std::cerr << "Unknown CC target type\n"; + exit(1); } std::set<std::shared_ptr<Task>> Task::getDependsTasks() |