Sfoglia il codice sorgente

Fix executable linking in header-only libraries

default_compile_flags
vector-of-bool 5 anni fa
parent
commit
f5ed674860
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      src/dds/build/plan/exe.cpp

+ 3
- 3
src/dds/build/plan/exe.cpp Vedi File

@@ -3,7 +3,6 @@
#include <dds/build/plan/library.hpp>
#include <dds/proc.hpp>

#include <range/v3/algorithm/find_if.hpp>
#include <spdlog/spdlog.h>

#include <cassert>
@@ -22,10 +21,11 @@ void link_executable_plan::link(build_env_ref env, const library_plan& lib) cons
spec.inputs = _input_libs;
if (lib.create_archive()) {
spec.inputs.push_back(lib.create_archive()->calc_archive_file_path(env));
auto main_obj = _main_compile.calc_object_file_path(env);
spec.inputs.push_back(std::move(main_obj));
}

auto main_obj = _main_compile.calc_object_file_path(env);
spec.inputs.push_back(std::move(main_obj));

const auto link_command = env.toolchain.create_link_executable_command(spec);
spdlog::info("Linking executable: {}", fs::relative(spec.output, env.output_root).string());
fs::create_directories(out_path.parent_path());

Loading…
Annulla
Salva