Skip to content

Commit 8f4fbb8

Browse files
committed
refactor(cli): consume engine toolchain
1 parent 4c5eb37 commit 8f4fbb8

7 files changed

Lines changed: 156 additions & 335 deletions

File tree

‎include/vix/cli/cmake/Toolchain.hpp‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,13 @@
1313
#ifndef VIX_CLI_TOOLCHAIN_HPP
1414
#define VIX_CLI_TOOLCHAIN_HPP
1515

16-
#include <string>
17-
#include <string_view>
18-
#include <vector>
16+
#include <vix/engine/Toolchain.hpp>
1917

2018
namespace vix::cli::build
2119
{
22-
std::string infer_processor_from_triple(std::string_view triple);
23-
std::string toolchain_contents_for_triple(
24-
const std::string &triple,
25-
const std::string &sysroot);
26-
27-
std::vector<std::string> detect_available_targets();
20+
using vix::engine::detect_available_targets;
21+
using vix::engine::infer_processor_from_triple;
22+
using vix::engine::toolchain_contents_for_triple;
2823
} // namespace vix::cli::build
2924

3025
#endif

‎include/vix/cli/process/Process.hpp‎

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,16 @@
1919
#include <utility>
2020
#include <vector>
2121

22+
#include <vix/engine/BuildTools.hpp>
2223
#include <vix/engine/ExecutionPlan.hpp>
2324
#include <vix/engine/Preset.hpp>
2425

2526
namespace vix::cli::process
2627
{
2728
namespace fs = std::filesystem;
2829

29-
/**
30-
* @brief Selects which linker strategy Vix should use for builds.
31-
*/
32-
enum class LinkerMode
33-
{
34-
Auto,
35-
Default,
36-
Mold,
37-
Lld
38-
};
39-
40-
/**
41-
* @brief Selects which compiler launcher/cache Vix should use.
42-
*/
43-
enum class LauncherMode
44-
{
45-
Auto,
46-
None,
47-
Sccache,
48-
Ccache
49-
};
30+
using LinkerMode = vix::engine::LinkerMode;
31+
using LauncherMode = vix::engine::LauncherMode;
5032

5133
/**
5234
* @brief Parsed options for the `vix build` command.

‎src/cmake/Toolchain.cpp‎

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)