Skip to content

Commit e0d8f17

Browse files
authored
Move compiler_float32 code into flambda2 (#2511)
move f32 lib to fl2
1 parent 3899acf commit e0d8f17

File tree

8 files changed

+21
-31
lines changed

8 files changed

+21
-31
lines changed

external/float32/dune

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

middle_end/flambda2/numbers/dune

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@
33
(library
44
(name flambda2_numbers)
55
(wrapped true)
6-
(instrumentation (backend bisect_ppx))
6+
(instrumentation
7+
(backend bisect_ppx))
78
(flags
8-
(:standard
9-
-principal
10-
-open
11-
Flambda2_algorithms
12-
-open
13-
Flambda2_ui))
9+
(:standard -principal -open Flambda2_algorithms -open Flambda2_ui))
10+
(foreign_stubs
11+
(language c)
12+
(names float32_stubs)
13+
(flags
14+
((:include %{project_root}/oc_cflags.sexp)
15+
(:include %{project_root}/sharedlib_cflags.sexp)
16+
(:include %{project_root}/oc_cppflags.sexp))))
1417
(ocamlopt_flags
1518
(:standard -O3 -open Int_replace_polymorphic_compare))
16-
(libraries ocamlcommon flambda2_algorithms flambda2_ui compiler_float32))
19+
(libraries ocamlcommon flambda2_algorithms flambda2_ui))
20+
21+
(install
22+
(files
23+
(dllflambda2_numbers_stubs.so as stublibs/dllflambda2_numbers_stubs.so))
24+
(section lib)
25+
(package ocaml))

middle_end/flambda2/numbers/numeric_types.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ end)
320320

321321
module Float32_by_bit_pattern = Float_by_bit_pattern_gen (struct
322322
include Int32
323-
module F32 = Compiler_float32
323+
module F32 = Float32
324324

325325
let of_string str = F32.to_bits (F32.of_string str)
326326

ocaml/Makefile.common-jst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ install_for_test: _install
271271
# Various directories are put on the -I paths by tools/Makefile;
272272
# utils/ is one such, so we just dump the .cm* files in there for
273273
# various things.
274-
mkdir _runtest/external
275-
cp $(main_build)/external/float32/*.{cma,a,cmxa} _runtest/external
276274
mkdir _runtest/utils
277275
cp _install/lib/ocaml/compiler-libs/*.{cmi,cmx} _runtest/utils
278276
cp $(main_build)/$(ocamldir)/.ocamlcommon.objs/byte/*.cmo _runtest/utils

testsuite/tools/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ codegen_PROG = codegen$(EXE)
3939
codegen_DIRS = parsing utils typing middle_end bytecomp lambda asmcomp
4040
codegen_OCAMLFLAGS = $(addprefix -I $(ROOTDIR)/, $(codegen_DIRS)) -w +40 -g
4141

42-
codegen_LIBS = unix $(ROOTDIR)/external/compiler_float32 \
43-
$(addprefix $(COMPILERLIBSDIR)/,\
44-
ocamlcommon \
45-
ocamloptcomp)
42+
codegen_LIBS = unix $(addprefix $(COMPILERLIBSDIR)/,\
43+
ocamlcommon \
44+
ocamloptcomp)
4645

4746
codegen_OBJECTS = $(addsuffix .cmo,\
4847
parsecmmaux parsecmm lexcmm codegen_main)

0 commit comments

Comments
 (0)