-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathllvm.cppm
More file actions
35 lines (24 loc) · 783 Bytes
/
llvm.cppm
File metadata and controls
35 lines (24 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// mcpp.toolchain.llvm - xlings LLVM package mapping.
export module mcpp.toolchain.llvm;
import std;
import mcpp.platform;
export namespace mcpp::toolchain::llvm {
bool is_alias(std::string_view compiler);
std::string package_name();
std::vector<std::string> frontend_candidates();
std::vector<std::string> list_aliases();
} // namespace mcpp::toolchain::llvm
namespace mcpp::toolchain::llvm {
bool is_alias(std::string_view compiler) {
return compiler == "llvm" || compiler == "clang";
}
std::string package_name() {
return "llvm";
}
std::vector<std::string> frontend_candidates() {
return {std::format("clang++{}", mcpp::platform::exe_suffix)};
}
std::vector<std::string> list_aliases() {
return {"llvm", "clang"};
}
} // namespace mcpp::toolchain::llvm