Skip to content

Commit

Permalink
flambda-backend: Merge ocaml-jst 2022-12-13 (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell authored Dec 13, 2022
1 parent 06c189a commit 131bc12
Show file tree
Hide file tree
Showing 63 changed files with 12,142 additions and 9,229 deletions.
10 changes: 3 additions & 7 deletions .depend
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,13 @@ utils/config.cmx : \
utils/config.cmi
utils/config.cmi :
utils/consistbl.cmo : \
utils/symbol.cmi \
utils/misc.cmi \
utils/compilation_unit.cmi \
utils/consistbl.cmi
utils/consistbl.cmx : \
utils/symbol.cmx \
utils/misc.cmx \
utils/compilation_unit.cmx \
utils/consistbl.cmi
utils/consistbl.cmi : \
utils/symbol.cmi \
utils/misc.cmi \
utils/compilation_unit.cmi
utils/misc.cmi
utils/diffing.cmo : \
utils/misc.cmi \
utils/diffing.cmi
Expand Down Expand Up @@ -1461,6 +1455,7 @@ typing/typecore.cmo : \
typing/types.cmi \
typing/typedtree.cmi \
typing/typedecl.cmi \
typing/type_immediacy.cmi \
typing/subst.cmi \
typing/shape.cmi \
typing/rec_check.cmi \
Expand Down Expand Up @@ -1495,6 +1490,7 @@ typing/typecore.cmx : \
typing/types.cmx \
typing/typedtree.cmx \
typing/typedecl.cmx \
typing/type_immediacy.cmx \
typing/subst.cmx \
typing/shape.cmx \
typing/rec_check.cmx \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: i386
config: CC='cc32' AS='as --32' ASPP='gcc -m32 -c' -host i386-linux PARTIALLD='ld -r -melf_i386'
os: ubuntu-latest
os: ubuntu-20.04
ocamlparam: ''
boot_config: CC='cc32' AS='as --32' ASPP='gcc -m32 -c' -host i386-linux PARTIALLD='ld -r -melf_i386'
boot_cachekey: 32bit
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ _build
/ocamldoc/test_stdlib
/ocamldoc/test_latex
/ocamldoc/test
/ocamldoc/stdlib_man

/ocamltest/.dep
/ocamltest/ocamltest
Expand All @@ -143,6 +144,7 @@ _build
/otherlibs/dynlink/dynlink_compilerlibs/*.ml
/otherlibs/dynlink/dynlink_compilerlibs/*.mli
/otherlibs/dynlink/dynlink_compilerlibs/.depend
/otherlibs/dynlink/dynlink_compilerlibs.mli
/otherlibs/threads/marshal.mli
/otherlibs/threads/stdlib.mli
/otherlibs/threads/unix.mli
Expand Down Expand Up @@ -240,6 +242,7 @@ _build
/tools/ocamlprof
/tools/ocamlprof.opt
/tools/opnames.ml
/tools/ocamlmklibconfig.ml
/tools/dumpobj
/tools/dumpobj.opt
/tools/dumpapprox
Expand Down
26 changes: 26 additions & 0 deletions HACKING.jst.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,29 @@ to build without running the testsuite, or:
$ make -f Makefile.jst hacking

to start a continuously polling build of the compiler.

Note that the dune-based build system is entirely separate from the main
Makefile, and so you will need to use `make -f Makefile.jst install`
to install after building.

## Testing

As demonstrated above, you can

$ make -f Makefile.jst runtest-upstream

to run the entire testsuite. As a shorter synonym, you may also

$ make -f Makefile.jst test

If you want to run just one test or one test directory, you can

$ make -f Makefile.jst test-one TEST=<<test file here>>
$ make -f Makefile.jst test-one DIR=<<test dir here>>

where the test file or test dir are specified with respect to the
`testsuite/tests` directory. For example:

$ make -f Makefile.jst test-one TEST=typing-local/local.ml
$ make -f Makefile.jst test-one DIR=typing-local

15 changes: 13 additions & 2 deletions Makefile.common-jst
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ main_build = _build/main

# The following horror will be removed when work to allow the testsuite to
# run on an installed tree (led by David Allsopp) is completed.
.PHONY: runtest-upstream
runtest-upstream: _install
.PHONY: runtest-upstream test install_for_test
install_for_test: _install
rm -rf _runtest
mkdir _runtest
ln -s ../_install _runtest/_install
Expand Down Expand Up @@ -250,6 +250,7 @@ runtest-upstream: _install
# ocamltest itself
mkdir _runtest/ocamltest
cp $(main_build)/$(ocamldir)/ocamltest/ocamltest.byte _runtest/ocamltest/ocamltest
test: install_for_test
if [ "$(middle_end)" = "flambda2" ]; then \
for dir in `cd ocaml/testsuite; ls -1 -d tests/*`; do \
if ! grep -q "^ $$dir " testsuite/flambda2-test-list; then \
Expand Down Expand Up @@ -280,6 +281,16 @@ runtest-upstream: _install
fi \
fi)

runtest-upstream: test

test-one: install_for_test
(export OCAMLSRCDIR=$$(pwd)/_runtest; \
export CAML_LD_LIBRARY_PATH=$$(pwd)/_runtest/lib/ocaml/stublibs; \
if $$(which gfortran > /dev/null 2>&1); then \
export LIBRARY_PATH=$$(dirname $$(gfortran -print-file-name=libgfortran.a)); \
fi; \
cd _runtest/testsuite && make one $(if $(TEST),TEST="tests/$(TEST)") $(if $(DIR),DIR="tests/$(DIR)"))

# This target is like a polling version of upstream "make ocamlopt"
.PHONY: hacking
hacking: _build/_bootinstall
Expand Down
Loading

0 comments on commit 131bc12

Please sign in to comment.