Procházet zdrojové kódy

`create_archive` is a confusing method name for a getter

default_compile_flags
vector-of-bool před 4 roky
rodič
revize
1e7db535f7
5 změnil soubory, kde provedl 8 přidání a 8 odebrání
  1. +2
    -2
      src/dds/build/builder.cpp
  2. +1
    -1
      src/dds/build/iter_compilations.hpp
  3. +2
    -2
      src/dds/build/plan/exe.cpp
  4. +2
    -2
      src/dds/build/plan/full.cpp
  5. +1
    -1
      src/dds/build/plan/library.hpp

+ 2
- 2
src/dds/build/builder.cpp Zobrazit soubor

@@ -150,7 +150,7 @@ prepare_ureqs(const build_plan& plan, const toolchain& toolchain, path_ref out_r
lib_reqs.include_paths.push_back(lib.library_().public_include_dir());
lib_reqs.uses = lib.library_().manifest().uses;
lib_reqs.links = lib.library_().manifest().links;
if (const auto& arc = lib.create_archive()) {
if (const auto& arc = lib.archive_plan()) {
lib_reqs.linkable_path = out_root / arc->calc_archive_file_path(toolchain);
}
}
@@ -170,7 +170,7 @@ void write_lml(build_env_ref env, const library_plan& lib, path_ref lml_path) {
for (auto&& link : lib.links()) {
out << "Links: " << link.namespace_ << "/" << link.name << '\n';
}
if (auto&& arc = lib.create_archive()) {
if (auto&& arc = lib.archive_plan()) {
out << "Path: "
<< (env.output_root / arc->calc_archive_file_path(env.toolchain)).generic_string()
<< '\n';

+ 1
- 1
src/dds/build/iter_compilations.hpp Zobrazit soubor

@@ -26,7 +26,7 @@ inline auto iter_libraries(const build_plan& plan) {
inline auto iter_compilations(const build_plan& plan) {
auto lib_compiles = //
iter_libraries(plan) //
| ranges::views::transform(&library_plan::create_archive) //
| ranges::views::transform(&library_plan::archive_plan) //
| ranges::views::filter([&](auto&& opt) { return bool(opt); }) //
| ranges::views::transform([&](auto&& opt) -> auto& { return opt->compile_files(); }) //
| ranges::views::join //

+ 2
- 2
src/dds/build/plan/exe.cpp Zobrazit soubor

@@ -25,11 +25,11 @@ void link_executable_plan::link(build_env_ref env, const library_plan& lib) cons
for (const lm::usage& links : _links) {
extend(spec.inputs, env.ureqs.link_paths(links));
}
if (lib.create_archive()) {
if (lib.archive_plan()) {
// The associated library has compiled components. Add the static library a as a linker
// input
spec.inputs.push_back(env.output_root
/ lib.create_archive()->calc_archive_file_path(env.toolchain));
/ lib.archive_plan()->calc_archive_file_path(env.toolchain));
}

// The main object should be a linker input, of course.

+ 2
- 2
src/dds/build/plan/full.cpp Zobrazit soubor

@@ -83,8 +83,8 @@ void build_plan::compile_all(const build_env& env, int njobs) const {

void build_plan::archive_all(const build_env& env, int njobs) const {
auto okay = parallel_run(iter_libraries(*this), njobs, [&](const library_plan& lib) {
if (lib.create_archive()) {
lib.create_archive()->archive(env);
if (lib.archive_plan()) {
lib.archive_plan()->archive(env);
}
});
if (!okay) {

+ 1
- 1
src/dds/build/plan/library.hpp Zobrazit soubor

@@ -97,7 +97,7 @@ public:
* A `create_archive_plan` object, or `nullopt`, depending on if this library has compiled
* components
*/
auto& create_archive() const noexcept { return _create_archive; }
auto& archive_plan() const noexcept { return _create_archive; }
/**
* The executables that should be created by this library
*/

Načítá se…
Zrušit
Uložit