Created
April 15, 2015 18:16
-
-
Save samlecuyer/9385b941efff752634b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/llvm_test[]> ocamlbuild toy.byte | |
Finished, 0 targets (0 cached) in 00:00:00. | |
+ /Users/cateches/.opam/4.02.0+trunk/bin/ocamlc.opt -c -o toy.cmo toy.ml | |
File "toy.ml", line 2, characters 5-9: | |
Error: Unbound module Llvm | |
Command exited with code 2. | |
Compilation unsuccessful after building 2 targets (1 cached) in 00:00:00. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* this is shamelessly copied from llvm.org | |
http://llvm.org/docs/tutorial/OCamlLangImpl3.html#full-code-listing *) | |
open Ocamlbuild_plugin;; | |
ocaml_lib ~extern:true "llvm";; | |
ocaml_lib ~extern:true "llvm_analysis";; | |
flag ["link"; "ocaml"; "g++"] (S[A"-cc"; A"g++"]);; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Llvm | |
let _ = | |
print_endline "we'll worry about using it later" | |
;; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've tried
ocamlbuild -pkg llvm toy.byte
but that gives mefollowed by ocamlopt's "usage" listing