summaryrefslogtreecommitdiff
path: root/src/tools.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2022-12-28 13:49:53 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-12 15:15:53 +0100
commitcc4e14d243f4e7e1ad487d8865c5ffc8423e473d (patch)
tree10473afd8cf2f6bd6385e1d50b0e2699069fb3eb /src/tools.h
parent430801b1307b4c820885f161d0b003011c892d77 (diff)
Add detected toolchain to configuration.cc
Diffstat (limited to 'src/tools.h')
-rw-r--r--src/tools.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/tools.h b/src/tools.h
index 49069d5..bedb708 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -8,12 +8,6 @@
#include "ctor.h"
-enum class ToolChain
-{
- gcc,
- clang,
-};
-
enum class opt
{
// gcc/clang
@@ -36,12 +30,15 @@ enum class opt
custom, // entire option taken verbatim from <arg>
};
+//! Get tool-chain type from compiler path string
+ctor::toolchain getToolChain(const std::string& compiler);
+
//! Get tool-chain type from output system (via configuration)
-ToolChain getToolChain(ctor::output_system system);
+ctor::toolchain getToolChain(ctor::output_system system);
//! Get tool argument(s) for specific option type matching the supplied
//! tool-chain
-std::vector<std::string> getOption(ToolChain tool_chain,
+std::vector<std::string> getOption(ctor::toolchain toolchain,
opt option,
const std::string& arg = {});
@@ -49,4 +46,4 @@ std::vector<std::string> getOption(ToolChain tool_chain,
//! ie. { opt::InludePath, "foo/bar" } from "-Ifoo/bar"
//! Returns { opt::Custom, flag } if unknown.
std::pair<opt, std::string> getOption(const std::string& flag,
- ToolChain tool_chain = ToolChain::gcc);
+ ctor::toolchain toolchain = ctor::toolchain::gcc);