mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15: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)
|
(modules :standard \ mkshims)
|
||||||
(flags :standard -warn-error -a+8 -w -32 -safe-string -strict-sequence -nolabels -open
|
(flags :standard -warn-error -a+8 -w -32 -safe-string -strict-sequence -nolabels -open
|
||||||
CCMonomorphic)
|
CCMonomorphic)
|
||||||
(ocamlopt_flags (:include ../flambda.flags))
|
|
||||||
(libraries seq either containers.monomorphic))
|
(libraries seq either containers.monomorphic))
|
||||||
|
|
||||||
(ocamllex (modules CCSexp_lex))
|
(ocamllex (modules CCSexp_lex))
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,4 @@
|
||||||
(public_name containers-data)
|
(public_name containers-data)
|
||||||
(wrapped false)
|
(wrapped false)
|
||||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -open CCShims_)
|
(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))
|
(libraries containers))
|
||||||
|
|
|
||||||
15
src/dune
15
src/dune
|
|
@ -1,15 +1,10 @@
|
||||||
(executable
|
|
||||||
(name mkflags)
|
|
||||||
(modules mkflags)
|
|
||||||
(libraries dune.configurator))
|
|
||||||
|
|
||||||
(env
|
(env
|
||||||
(_ (flags :standard -warn-error -3)))
|
(_
|
||||||
|
(flags :standard -warn-error -3 -color always)
|
||||||
(rule
|
(ocamlopt_flags :standard -O3 -unbox-closures -unbox-closures-factor 20
|
||||||
(targets flambda.flags)
|
-inline 100)
|
||||||
(mode fallback)
|
))
|
||||||
(action (run ./mkflags.exe)))
|
|
||||||
|
|
||||||
(executable
|
(executable
|
||||||
(name mdx_runner)
|
(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)
|
(public_name containers.monomorphic)
|
||||||
(modules CCMonomorphic CCMonomorphicShims_)
|
(modules CCMonomorphic CCMonomorphicShims_)
|
||||||
(wrapped false)
|
(wrapped false)
|
||||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
||||||
(ocamlopt_flags :standard (:include ../flambda.flags)))
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,5 @@
|
||||||
(wrapped false)
|
(wrapped false)
|
||||||
(optional)
|
(optional)
|
||||||
(flags :standard -warn-error -a+8 -w -32 -safe-string -open CCShims_)
|
(flags :standard -warn-error -a+8 -w -32 -safe-string -open CCShims_)
|
||||||
(ocamlopt_flags :standard (:include ../flambda.flags))
|
|
||||||
(libraries containers threads))
|
(libraries containers threads))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,4 @@
|
||||||
(public_name containers.top)
|
(public_name containers.top)
|
||||||
(wrapped false)
|
(wrapped false)
|
||||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
(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))
|
(libraries compiler-libs.common containers containers.unix))
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,4 @@
|
||||||
(wrapped false)
|
(wrapped false)
|
||||||
(optional)
|
(optional)
|
||||||
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
(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