Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move compiler_float32 code into flambda2 #2511

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
move f32 lib to fl2
  • Loading branch information
TheNumbat committed Apr 30, 2024
commit 8e78ff4f510297b15e9dae8434facbfb0b23bc8d
16 changes: 0 additions & 16 deletions external/float32/dune

This file was deleted.

25 changes: 17 additions & 8 deletions middle_end/flambda2/numbers/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
(library
(name flambda2_numbers)
(wrapped true)
(instrumentation (backend bisect_ppx))
(instrumentation
(backend bisect_ppx))
(flags
(:standard
-principal
-open
Flambda2_algorithms
-open
Flambda2_ui))
(:standard -principal -open Flambda2_algorithms -open Flambda2_ui))
(foreign_stubs
(language c)
(names float32_stubs)
(flags
((:include %{project_root}/oc_cflags.sexp)
(:include %{project_root}/sharedlib_cflags.sexp)
(:include %{project_root}/oc_cppflags.sexp))))
(ocamlopt_flags
(:standard -O3 -open Int_replace_polymorphic_compare))
(libraries ocamlcommon flambda2_algorithms flambda2_ui compiler_float32))
(libraries ocamlcommon flambda2_algorithms flambda2_ui))

(install
(files
(dllflambda2_numbers_stubs.so as stublibs/dllflambda2_numbers_stubs.so))
(section lib)
(package ocaml))
2 changes: 1 addition & 1 deletion middle_end/flambda2/numbers/numeric_types.ml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ end)

module Float32_by_bit_pattern = Float_by_bit_pattern_gen (struct
include Int32
module F32 = Compiler_float32
module F32 = Float32

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

Expand Down
2 changes: 0 additions & 2 deletions ocaml/Makefile.common-jst
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ install_for_test: _install
# Various directories are put on the -I paths by tools/Makefile;
# utils/ is one such, so we just dump the .cm* files in there for
# various things.
mkdir _runtest/external
cp $(main_build)/external/float32/*.{cma,a,cmxa} _runtest/external
mkdir _runtest/utils
cp _install/lib/ocaml/compiler-libs/*.{cmi,cmx} _runtest/utils
cp $(main_build)/$(ocamldir)/.ocamlcommon.objs/byte/*.cmo _runtest/utils
Expand Down
7 changes: 3 additions & 4 deletions testsuite/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ codegen_PROG = codegen$(EXE)
codegen_DIRS = parsing utils typing middle_end bytecomp lambda asmcomp
codegen_OCAMLFLAGS = $(addprefix -I $(ROOTDIR)/, $(codegen_DIRS)) -w +40 -g

codegen_LIBS = unix $(ROOTDIR)/external/compiler_float32 \
$(addprefix $(COMPILERLIBSDIR)/,\
ocamlcommon \
ocamloptcomp)
codegen_LIBS = unix $(addprefix $(COMPILERLIBSDIR)/,\
ocamlcommon \
ocamloptcomp)

codegen_OBJECTS = $(addsuffix .cmo,\
parsecmmaux parsecmm lexcmm codegen_main)
Expand Down
Loading