We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8884ad3 commit 9d20e33Copy full SHA for 9d20e33
src/api.cpp
@@ -1,11 +1,12 @@
1
#include "cx.h"
2
-
3
#ifdef _WIN32
4
// TODO
5
#else
6
#include <dlfcn.h>
7
#endif
8
+#pragma warning(push, 0)
+#include <llvm/Support/CommandLine.h>
9
+#pragma warning(pop)
10
#include "ast/mangle.h"
11
#include "ast/module.h"
12
#include "driver/driver.h"
@@ -33,6 +34,8 @@ void cxLoadScriptFromFile(CxModule* module, const char* filePath) {
33
34
}
35
36
CxCompileResult cxCompileModule(CxModule* module) {
37
+ const char* argv[] = {nullptr, "--backend=c"};
38
+ llvm::cl::ParseCommandLineOptions(2, argv);
39
int status = buildModule(module->module, {.createSharedLib = true});
40
return CxCompileResult{.status = status};
41
0 commit comments