Skip to content

Commit 7718414

Browse files
flambda-backend: Prefix otherlibs build artifacts (#2595)
* Rely on Dune for otherlibs installation rules * Fix a few references to `Float32` * Fix `Float32` flambda tests --------- Co-authored-by: Diana Kalinichenko <[email protected]>
1 parent 09215c9 commit 7718414

File tree

12 files changed

+14
-86
lines changed

12 files changed

+14
-86
lines changed

otherlibs/alpha/dune

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
(library
1919
(name alpha)
20-
(wrapped false)
20+
(public_name ocaml.alpha)
2121
(modes byte native)
2222
(flags
2323
(-strict-sequence
@@ -56,9 +56,3 @@
5656
(with-stdout-to
5757
to_install.sexp
5858
(run "%{first-dep}" "alpha"))))
59-
60-
(install
61-
(files
62-
(include to_install.sexp))
63-
(section lib)
64-
(package ocaml))

otherlibs/beta/dune

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
(library
1919
(name beta)
20-
(wrapped false)
20+
(public_name ocaml.beta)
2121
(modes byte native)
2222
(enabled_if
2323
(= %{architecture} "amd64"))
@@ -58,11 +58,3 @@
5858
(with-stdout-to
5959
to_install.sexp
6060
(run "%{first-dep}" "beta"))))
61-
62-
(install
63-
(enabled_if
64-
(= %{architecture} "amd64"))
65-
(files
66-
(include to_install.sexp))
67-
(section lib)
68-
(package ocaml))

otherlibs/stable/dune

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
(library
1919
(name stable)
20-
(wrapped false)
20+
(public_name ocaml.stable)
2121
(modes byte native)
2222
(flags
2323
(-strict-sequence
@@ -66,9 +66,3 @@
6666
(with-stdout-to
6767
to_install.sexp
6868
(run "%{first-dep}" "stable"))))
69-
70-
(install
71-
(files
72-
(include to_install.sexp))
73-
(section lib)
74-
(package ocaml))

otherlibs/stdlib_alpha/dune

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
(library
1616
(name stdlib_alpha)
17-
(wrapped false)
17+
(public_name ocaml.stdlib_alpha)
1818
(modes byte native)
1919
(flags
2020
(-strict-sequence
@@ -42,9 +42,3 @@
4242
(with-stdout-to
4343
to_install.sexp
4444
(run "%{first-dep}" "stdlib_alpha"))))
45-
46-
(install
47-
(files
48-
(include to_install.sexp))
49-
(section lib)
50-
(package ocaml))

otherlibs/stdlib_beta/dune

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
(library
1616
(name stdlib_beta)
17-
(wrapped false)
17+
(public_name ocaml.stdlib_beta)
1818
(modes byte native)
1919
(enabled_if
2020
(= %{architecture} "amd64"))
@@ -44,11 +44,3 @@
4444
(with-stdout-to
4545
to_install.sexp
4646
(run "%{first-dep}" "stdlib_beta"))))
47-
48-
(install
49-
(enabled_if
50-
(= %{architecture} "amd64"))
51-
(files
52-
(include to_install.sexp))
53-
(section lib)
54-
(package ocaml))

otherlibs/stdlib_stable/dune

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
(library
1616
(name stdlib_stable)
17-
(wrapped false)
17+
(public_name ocaml.stdlib_stable)
1818
(modes byte native)
1919
(flags
2020
(-strict-sequence
@@ -42,9 +42,3 @@
4242
(with-stdout-to
4343
to_install.sexp
4444
(run "%{first-dep}" "stdlib_stable"))))
45-
46-
(install
47-
(files
48-
(include to_install.sexp))
49-
(section lib)
50-
(package ocaml))

otherlibs/stdlib_upstream_compatible/dune

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
(library
1616
(name stdlib_upstream_compatible)
17-
(wrapped false)
17+
(public_name ocaml.stdlib_upstream_compatible)
1818
(modes byte native)
1919
(flags
2020
(-strict-sequence
@@ -42,9 +42,3 @@
4242
(with-stdout-to
4343
to_install.sexp
4444
(run "%{first-dep}" "stdlib_upstream_compatible"))))
45-
46-
(install
47-
(files
48-
(include to_install.sexp))
49-
(section lib)
50-
(package ocaml))

otherlibs/to_install.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

otherlibs/upstream_compatible/dune

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
(library
2020
(name upstream_compatible)
21-
(wrapped false)
21+
(public_name ocaml.upstream_compatible)
2222
(modes byte native)
2323
(flags
2424
(-strict-sequence
@@ -57,9 +57,3 @@
5757
(with-stdout-to
5858
to_install.sexp
5959
(run "%{first-dep}" "upstream_compatible"))))
60-
61-
(install
62-
(files
63-
(include to_install.sexp))
64-
(section lib)
65-
(package ocaml))

testsuite/tests/mixed-blocks/constructor_args.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
(* Prelude: Functions on unboxed numbers *)
1515

1616
module Float32_u = Beta.Float32_u
17+
module Float32 = Beta.Float32
1718
module Float_u = Stable.Float_u
1819
module Int32_u = Stable.Int32_u
1920
module Int64_u = Stable.Int64_u

testsuite/tests/typing-layouts-arrays/test_float32_u_array.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module Float32_u_array0 : Gen_u_array.S0
6565
"caml_array_blit" "caml_unboxed_float32_vect_blit"
6666
let empty () = [||]
6767
external to_boxed : ('a : float32) -> (float32[@local_opt]) = "%box_float32"
68-
let compare_element x y = Float32.compare (to_boxed (x ())) (to_boxed (y ()))
68+
let compare_element x y = Beta.Float32.compare (to_boxed (x ())) (to_boxed (y ()))
6969
end
7070

7171
module Float32_u_array = Gen_u_array.Make (Float32_u_array0)

testsuite/tests/typing-layouts-float32/alloc.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ struct
8282
measure_alloc (fun () -> go #0.s #0.s)
8383
in
8484
Printf.printf "Unboxed:\n estimate: %f\n allocations: %s\n"
85-
(Float32.to_float (to_float32 est) *. 4.) (get_allocations ())
85+
(Beta.Float32.to_float (to_float32 est) *. 4.) (get_allocations ())
8686
end
8787

8888
module Pi_boxed =
8989
struct
90-
open Float32
90+
open Beta.Float32
9191
open Operators
9292

9393
let[@inline never] step n estimate =
@@ -125,8 +125,8 @@ let print_record_and_allocs s r =
125125
Printf.printf
126126
"%s:\n allocated bytes: %.2f\n a: %.2f\n b: %.2f\n c: %.2f\n d: %.2f\n"
127127
s allocs
128-
(Float32.to_float (Float32_u.to_float32 r.a)) (Float32.to_float (Float32_u.to_float32 r.b))
129-
(Float32.to_float (Float32_u.to_float32 r.c)) (Float32.to_float (Float32_u.to_float32 r.d))
128+
(Beta.Float32.to_float (Float32_u.to_float32 r.a)) (Beta.Float32.to_float (Float32_u.to_float32 r.b))
129+
(Beta.Float32.to_float (Float32_u.to_float32 r.c)) (Beta.Float32.to_float (Float32_u.to_float32 r.d))
130130

131131
(* Building a record should only allocate the box *)
132132
let[@inline never] build x =

0 commit comments

Comments
 (0)