diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-23 12:14:46 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-12-23 20:07:52 +0100 |
commit | 4aa3c169b0a716d56254dbda2ab2b90d1876e7ad (patch) | |
tree | d7de3a3dcc5919ffb2776446be5b7c881c83c2ca /src/task_ld.cc | |
parent | 78c5477b3989d67169de2d05665adfb801caab23 (diff) |
WIPmsvc-jenkins
Diffstat (limited to 'src/task_ld.cc')
-rw-r--r-- | src/task_ld.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/task_ld.cc b/src/task_ld.cc index c8cd1ea..dbe17c5 100644 --- a/src/task_ld.cc +++ b/src/task_ld.cc @@ -115,6 +115,7 @@ int TaskLD::runInner() } append(args, ld_option(toolchain, ctor::ld_opt::output, targetFile().string())); + append(args, to_strings(toolchain, {ctor::toolchain::msvc, ctor::ld_opt::custom, "/nologo"})); { // Write flags to file. std::ofstream flagsStream(flagsFile); @@ -126,8 +127,27 @@ int TaskLD::runInner() std::cout << "LD => " << targetFile().string() << std::endl; } - auto tool = compiler(); + std::string tool; const auto& c = ctor::get_configuration(); + + if(toolchain == ctor::toolchain::gcc || + toolchain == ctor::toolchain::clang) + { + tool = compiler(); + } + else // msvc + { + switch(outputSystem()) + { + case ctor::output_system::host: + tool = c.get(ctor::cfg::host_ld, "/usr/bin/ld"); + break; + case ctor::output_system::build: + tool = c.get(ctor::cfg::build_ld, "/usr/bin/ld"); + break; + } + } + return execute(settings, tool, args, c.env, is_self); } @@ -196,7 +216,6 @@ std::string TaskLD::flagsString() const flagsStr += str; } } - flagsStr += "\n"; for(const auto& dep : config.depends) { |