-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (29 loc) · 867 Bytes
/
main.cpp
File metadata and controls
37 lines (29 loc) · 867 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
36
37
#include "env.hpp"
#include "common.hpp"
#include "builder.hpp"
#include "compiler.hpp"
int main_windows(int argc, char** argv) {
TODO(
"Implement Windows Compatibility",
signature(),
"wombat::main_windows"
);
return 0;
}
int main_linux(int argc, char** argv) {
// Builder is just a wrapper around the build configuration.
Builder wombat_builder = Builder();
wombat_builder.init(*argv);
// This fills the 'config' of the builder.
wombat_builder.parse_arguments(argc, argv + 1);
if(!wombat_builder.config.src) {
wombat_builder.dump_err_and_exit(ErrCode::NotEnoughArguments, "missing target to compile.");
}
Compiler compiler = Compiler();
compiler.compile_target(wombat_builder.config);
return 0;
}
int main(int argc, char** argv) {
main_linux(argc, argv);
return 0;
}