mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
[OCaml] Drop support for 3.12.1 and earlier.
In practice this means:
* Always using -g flag.
* Embedding -cclib -lstdc++ into the corresponding cma/cmxa file.
This also moves -lstdc++ in a single place.
* Using caml_named_value instead of a homegrown mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
(*===-- llvm_executionengine.ml - LLVM OCaml Interface ----------*- C++ -*-===*
|
||||
(*===-- llvm_executionengine.ml - LLVM OCaml Interface --------*- OCaml -*-===*
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
*
|
||||
@@ -7,21 +7,18 @@
|
||||
*
|
||||
*===----------------------------------------------------------------------===*)
|
||||
|
||||
|
||||
exception Error of string
|
||||
|
||||
external register_exns: exn -> unit
|
||||
= "llvm_register_ee_exns"
|
||||
|
||||
let () = Callback.register_exception "Llvm_executionengine.Error" (Error "")
|
||||
|
||||
module CodeModel = struct
|
||||
type t =
|
||||
| Default
|
||||
| JIT_default
|
||||
| Small
|
||||
| Kernel
|
||||
| Medium
|
||||
| Large
|
||||
| Default
|
||||
| JIT_default
|
||||
| Small
|
||||
| Kernel
|
||||
| Medium
|
||||
| Large
|
||||
end
|
||||
|
||||
module GenericValue = struct
|
||||
@@ -71,14 +68,6 @@ module ExecutionEngine = struct
|
||||
no_framepointer_elim = false;
|
||||
enable_fast_isel = false }
|
||||
|
||||
(* FIXME: Ocaml is not running this setup code unless we use 'val' in the
|
||||
interface, which causes the emission of a stub for each function;
|
||||
using 'external' in the module allows direct calls into
|
||||
ocaml_executionengine.c. This is hardly fatal, but it is unnecessary
|
||||
overhead on top of the two stubs that are already invoked for each
|
||||
call into LLVM. *)
|
||||
let _ = register_exns (Error "")
|
||||
|
||||
external create: Llvm.llmodule -> t
|
||||
= "llvm_ee_create"
|
||||
external create_interpreter: Llvm.llmodule -> t
|
||||
|
||||
Reference in New Issue
Block a user