Reviewed By: jvillard Differential Revision: D20322877 fbshipit-source-id: 0034a4163master
parent
fff3a491bf
commit
0c7249b992
@ -0,0 +1,16 @@
|
|||||||
|
; Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
;
|
||||||
|
; This source code is licensed under the MIT license found in the
|
||||||
|
; LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
(executable
|
||||||
|
(public_name sledge)
|
||||||
|
(package sledge)
|
||||||
|
(libraries dune-build-info llvm llvm.irreader llvm.analysis llvm.scalar_opts
|
||||||
|
llvm.target llvm.ipo llvm.linker shexp.process yojson trace import
|
||||||
|
sledgelib model)
|
||||||
|
(flags
|
||||||
|
(:standard -open Import -open Sledgelib -open Model))
|
||||||
|
(preprocess
|
||||||
|
(pps ppx_compare ppx_custom_printf ppx_expect ppx_hash ppx_here
|
||||||
|
ppx_inline_test ppx_let ppx_sexp_conv ppx_sexp_value ppx_trace)))
|
@ -1,22 +0,0 @@
|
|||||||
(* -*- tuareg -*- *)
|
|
||||||
(*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*)
|
|
||||||
|
|
||||||
let deps = ["import"; "libsledge"; "model"]
|
|
||||||
|
|
||||||
;;
|
|
||||||
Jbuild_plugin.V1.send
|
|
||||||
@@ Format.sprintf
|
|
||||||
{|
|
|
||||||
(executable
|
|
||||||
(public_name sledge)
|
|
||||||
(package sledge)
|
|
||||||
(libraries dune-build-info llvm llvm.irreader llvm.analysis llvm.scalar_opts llvm.target llvm.ipo llvm.linker shexp.process yojson %s)
|
|
||||||
%s)
|
|
||||||
|}
|
|
||||||
(libraries ("trace" :: deps))
|
|
||||||
(flags `exe deps)
|
|
@ -1,59 +0,0 @@
|
|||||||
(* -*- tuareg -*- *)
|
|
||||||
(*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*)
|
|
||||||
|
|
||||||
let common_flags =
|
|
||||||
{|(-w +a-4-9-18-40-42-44-48@50-66
|
|
||||||
-strict-formats -strict-sequence
|
|
||||||
-short-paths -bin-annot -keep-docs
|
|
||||||
-unboxed-types)|}
|
|
||||||
|
|
||||||
let ocamlc_flags =
|
|
||||||
match Jbuild_plugin.V1.context with
|
|
||||||
| "opt" | "dbg-opt" -> "-w -26-32 -noassert"
|
|
||||||
| _ -> "-g"
|
|
||||||
|
|
||||||
let ocamlopt_flags =
|
|
||||||
match Jbuild_plugin.V1.context with
|
|
||||||
| "opt" | "dbg-opt" -> ocamlc_flags ^ " -w -a -O3"
|
|
||||||
| _ -> ocamlc_flags
|
|
||||||
|
|
||||||
let coverage_ppx =
|
|
||||||
match Jbuild_plugin.V1.context with "coverage" -> "bisect_ppx" | _ -> ""
|
|
||||||
|
|
||||||
let ppx_flags =
|
|
||||||
match Jbuild_plugin.V1.context with
|
|
||||||
| "dbg" | "dbg-opt" -> "--debug"
|
|
||||||
| _ -> ""
|
|
||||||
|
|
||||||
let flags exe_or_lib deps =
|
|
||||||
Printf.sprintf
|
|
||||||
{|(flags (%s %s))
|
|
||||||
(ocamlc_flags (%s))
|
|
||||||
(ocamlopt_flags (%s))
|
|
||||||
(preprocess
|
|
||||||
(pps
|
|
||||||
ppx_compare
|
|
||||||
ppx_custom_printf
|
|
||||||
ppx_expect
|
|
||||||
ppx_hash
|
|
||||||
ppx_here
|
|
||||||
ppx_inline_test
|
|
||||||
ppx_let
|
|
||||||
ppx_sexp_conv
|
|
||||||
ppx_sexp_value
|
|
||||||
ppx_trace
|
|
||||||
%s
|
|
||||||
%s))
|
|
||||||
%s|}
|
|
||||||
common_flags
|
|
||||||
(String.concat " "
|
|
||||||
(List.map (fun d -> "-open " ^ String.capitalize_ascii d) deps))
|
|
||||||
ocamlc_flags ocamlopt_flags ppx_flags coverage_ppx
|
|
||||||
(match exe_or_lib with `lib -> "(inline_tests)" | _ -> "")
|
|
||||||
|
|
||||||
let libraries deps = String.concat " " deps
|
|
@ -0,0 +1,14 @@
|
|||||||
|
; Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
;
|
||||||
|
; This source code is licensed under the MIT license found in the
|
||||||
|
; LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name sledgelib)
|
||||||
|
(libraries apron apron.boxMPQ ctypes ctypes.foreign trace import)
|
||||||
|
(flags
|
||||||
|
(:standard -open Import))
|
||||||
|
(preprocess
|
||||||
|
(pps ppx_compare ppx_custom_printf ppx_expect ppx_hash ppx_here
|
||||||
|
ppx_inline_test ppx_let ppx_sexp_conv ppx_sexp_value ppx_trace))
|
||||||
|
(inline_tests))
|
@ -1,21 +0,0 @@
|
|||||||
(* -*- tuareg -*- *)
|
|
||||||
(*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*)
|
|
||||||
|
|
||||||
let deps = ["import"]
|
|
||||||
|
|
||||||
;;
|
|
||||||
Jbuild_plugin.V1.send
|
|
||||||
@@ Format.sprintf
|
|
||||||
{|
|
|
||||||
(library
|
|
||||||
(name libsledge)
|
|
||||||
(libraries apron apron.boxMPQ ctypes ctypes.foreign %s)
|
|
||||||
%s)
|
|
||||||
|}
|
|
||||||
(libraries ("trace" :: deps))
|
|
||||||
(flags `lib deps)
|
|
@ -0,0 +1,14 @@
|
|||||||
|
; Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
;
|
||||||
|
; This source code is licensed under the MIT license found in the
|
||||||
|
; LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name import)
|
||||||
|
(public_name sledge.import)
|
||||||
|
(libraries core core_kernel.fheap zarith trace)
|
||||||
|
(flags (:standard))
|
||||||
|
(preprocess
|
||||||
|
(pps ppx_compare ppx_custom_printf ppx_expect ppx_hash ppx_here
|
||||||
|
ppx_inline_test ppx_let ppx_sexp_conv ppx_sexp_value ppx_trace))
|
||||||
|
(inline_tests))
|
@ -1,22 +0,0 @@
|
|||||||
(* -*- tuareg -*- *)
|
|
||||||
(*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*)
|
|
||||||
|
|
||||||
let deps = []
|
|
||||||
|
|
||||||
;;
|
|
||||||
Jbuild_plugin.V1.send
|
|
||||||
@@ Format.sprintf
|
|
||||||
{|
|
|
||||||
(library
|
|
||||||
(name import)
|
|
||||||
(public_name sledge.import)
|
|
||||||
(libraries core core_kernel.fheap zarith %s)
|
|
||||||
%s)
|
|
||||||
|}
|
|
||||||
(libraries ("trace" :: deps))
|
|
||||||
(flags `lib deps)
|
|
Loading…
Reference in new issue