瀏覽代碼

Fix linker order, again

default_compile_flags
vector-of-bool 4 年之前
父節點
當前提交
9a46118c28
共有 1 個檔案被更改,包括 5 行新增4 行删除
  1. +5
    -4
      src/dds/build/plan/exe.cpp

+ 5
- 4
src/dds/build/plan/exe.cpp 查看文件

@@ -28,10 +28,6 @@ void link_executable_plan::link(build_env_ref env, const library_plan& lib) cons
dds_log(trace, "Add entry point object file: {}", main_obj.string());
spec.inputs.push_back(std::move(main_obj));

for (const lm::usage& links : _links) {
dds_log(trace, " - Link with: {}/{}", links.name, links.namespace_);
extend(spec.inputs, env.ureqs.link_paths(links));
}
if (lib.archive_plan()) {
// The associated library has compiled components. Add the static library a as a linker
// input
@@ -42,6 +38,11 @@ void link_executable_plan::link(build_env_ref env, const library_plan& lib) cons
dds_log(trace, "Executable has no corresponding archive library input");
}

for (const lm::usage& links : _links) {
dds_log(trace, " - Link with: {}/{}", links.name, links.namespace_);
extend(spec.inputs, env.ureqs.link_paths(links));
}

// Do it!
const auto link_command
= env.toolchain.create_link_executable_command(spec, dds::fs::current_path(), env.knobs);

Loading…
取消
儲存