mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-05 19:00:31 -05:00
perf: uniformize ocamlopt_flags
we don't need codegen which depends on >= 4.03, it's assumed. Also include a reasonable value for `-inline` when flambda isn't available.
This commit is contained in:
parent
7ec9e50f74
commit
8c9d7016b8
8 changed files with 7 additions and 38 deletions
|
|
@ -19,7 +19,6 @@
|
|||
(modules :standard \ mkshims)
|
||||
(flags :standard -warn-error -a+8 -w -32 -safe-string -strict-sequence -nolabels -open
|
||||
CCMonomorphic)
|
||||
(ocamlopt_flags (:include ../flambda.flags))
|
||||
(libraries seq either containers.monomorphic))
|
||||
|
||||
(ocamllex (modules CCSexp_lex))
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@
|
|||
(public_name containers-data)
|
||||
(wrapped false)
|
||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -open CCShims_)
|
||||
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||
(libraries containers))
|
||||
|
|
|
|||
15
src/dune
15
src/dune
|
|
@ -1,15 +1,10 @@
|
|||
(executable
|
||||
(name mkflags)
|
||||
(modules mkflags)
|
||||
(libraries dune.configurator))
|
||||
|
||||
(env
|
||||
(_ (flags :standard -warn-error -3)))
|
||||
|
||||
(rule
|
||||
(targets flambda.flags)
|
||||
(mode fallback)
|
||||
(action (run ./mkflags.exe)))
|
||||
(_
|
||||
(flags :standard -warn-error -3 -color always)
|
||||
(ocamlopt_flags :standard -O3 -unbox-closures -unbox-closures-factor 20
|
||||
-inline 100)
|
||||
))
|
||||
|
||||
(executable
|
||||
(name mdx_runner)
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
module C = Configurator.V1
|
||||
|
||||
let () =
|
||||
C.main ~name:"mkflags" (fun c ->
|
||||
let version = C.ocaml_config_var_exn c "version" in
|
||||
let major, minor =
|
||||
Scanf.sscanf version "%u.%u"
|
||||
(fun major minor -> major, minor)
|
||||
in
|
||||
let after_4_3 = (major, minor) >= (4, 3) in
|
||||
let sexp =
|
||||
if after_4_3 then (
|
||||
["-O3"; "-unbox-closures"; "-unbox-closures-factor"; "20"; "-color"; "always"]
|
||||
) else (
|
||||
["-inline"; "100"]
|
||||
) in
|
||||
C.Flags.write_sexp "flambda.flags" sexp
|
||||
)
|
||||
|
|
@ -14,5 +14,4 @@
|
|||
(public_name containers.monomorphic)
|
||||
(modules CCMonomorphic CCMonomorphicShims_)
|
||||
(wrapped false)
|
||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||
(ocamlopt_flags :standard (:include ../flambda.flags)))
|
||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
||||
|
|
|
|||
|
|
@ -5,6 +5,5 @@
|
|||
(wrapped false)
|
||||
(optional)
|
||||
(flags :standard -warn-error -a+8 -w -32 -safe-string -open CCShims_)
|
||||
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||
(libraries containers threads))
|
||||
|
||||
|
|
|
|||
|
|
@ -5,5 +5,4 @@
|
|||
(public_name containers.top)
|
||||
(wrapped false)
|
||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||
(libraries compiler-libs.common containers containers.unix))
|
||||
|
|
|
|||
|
|
@ -5,6 +5,4 @@
|
|||
(wrapped false)
|
||||
(optional)
|
||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||
(libraries unix)
|
||||
)
|
||||
(libraries unix))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue