File tree 5 files changed +34
-18
lines changed
5 files changed +34
-18
lines changed Original file line number Diff line number Diff line change 1
1
_build
2
2
.merlin
3
3
* .swp
4
+ * .so
Original file line number Diff line number Diff line change
1
+ ## Meta
2
+
3
+ The project is forked from https://github.com/adamrk/llvm-ocaml-tutorial .
4
+
5
+ ## Build
6
+
7
+ ` opam install core async ctypes-foreign llvm menhir `
8
+
9
+ ` export LD_LIBRARY_PATH=/path/to/libbindings.so ` .
10
+
11
+ The path is ` _build/default/stubs/libbindings.so ` by default.
12
+
13
+ ## Run
14
+
15
+ ` ./path/to/bin/kaleidoscope.exe < example/mandel.kal `
Original file line number Diff line number Diff line change 1
1
(executable
2
2
(name kaleidoscope)
3
- (libraries
4
- async
5
- core
6
- kaleidoscope_lib)
7
- (link_deps (file ../stubs/libbindings.so))
3
+ (libraries async core kaleidoscope_lib)
4
+ (link_deps
5
+ (file ../stubs/libbindings.so))
8
6
(link_flags -cclib -Lstubs -cclib -lbindings)
9
- (preprocess (pps ppx_jane ppx_expect ppx_let)))
7
+ (preprocess
8
+ (pps ppx_jane ppx_expect ppx_let)))
Original file line number Diff line number Diff line change 4
4
let open Command.Let_syntax in
5
5
Command. basic ~summary: " Parse and print kaleidoscope"
6
6
[% map_open
7
- let file = flag " file" (optional file ) ~doc: " FILE read input from file" in
7
+ let file = flag " file" (optional string ) ~doc: " FILE read input from file" in
8
8
fun () -> Kaleidoscope_lib.Toplevel. main (match file with
9
9
| None -> `Stdin
10
10
| Some file -> `File file)]
Original file line number Diff line number Diff line change 1
1
(library
2
2
(name kaleidoscope_lib)
3
- (libraries
4
- async
5
- core
6
- ctypes.foreign
7
- llvm
8
- llvm.analysis
9
- llvm.executionengine
10
- llvm.target
11
- llvm.scalar_opts
12
- menhirLib)
13
- (preprocess (pps ppx_jane ppx_expect ppx_let))
3
+ (libraries
4
+ async
5
+ core
6
+ ctypes.foreign
7
+ llvm
8
+ llvm.analysis
9
+ llvm.executionengine
10
+ llvm.target
11
+ llvm.scalar_opts
12
+ menhirLib)
13
+ (preprocess
14
+ (pps ppx_jane -allow-unannotated-ignores ppx_expect ppx_let))
14
15
(inline_tests))
15
16
16
17
(ocamllex lexer)
You can’t perform that action at this time.
0 commit comments