Browse Source

Reverse order of linker inputs to fix linker order resolution

default_compile_flags
vector-of-bool 5 years ago
parent
commit
01c56a7130
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/dds/build/plan/exe.cpp

+ 2
- 0
src/dds/build/plan/exe.cpp View File



#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>


#include <algorithm>
#include <cassert> #include <cassert>


using namespace dds; using namespace dds;


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


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

Loading…
Cancel
Save