Commit Graph

1236 Commits (master)

Author SHA1 Message Date
David Allsopp b91415d47e Allow tools/unlabel to run from anywhere 2020-07-27 12:41:34 +01:00
David Allsopp 2b618ea026 Check that tools/unlabel is a no-op in CI 2020-07-27 12:41:21 +01:00
Florian Angeletti c99cbd1101 Reorganize release info 2020-07-26 17:45:35 +02:00
Gabriel Scherer b1d1c0b77c
Merge pull request #9657 from nojb/warning_mnemonics
Add mnemonics for warnings
2020-07-21 11:47:37 +02:00
Nicolás Ojeda Bär 214146c570 Adapt caml-tex 2020-07-20 21:53:11 +02:00
Xavier Leroy de877859cf Test "no naked pointers" along with "flambda" 2020-07-20 09:37:32 +02:00
John Whitington 1d19609646 Match documentation and labels 2020-07-19 13:34:25 +01:00
John Whitington 926995b012 Generate moreLabels.mli programatically 2020-07-18 17:12:16 +01:00
John Whitington e8e5b7e73f Make hashtbl.mli / set.mli / map.mli from labeled 2020-07-18 12:03:03 +01:00
John Whitington 594a75f696 Check-typo fix 2020-07-18 09:56:30 +01:00
John Whitington 84414661c1 Unify unixLabels.mli / unix.mli via tools/unlabel 2020-07-17 17:26:28 +01:00
Xavier Leroy 2b24b3802f Fix "main" CI script w.r.t. macOS
Stopped working after 0b6ebb315
2020-07-14 14:35:21 +02:00
Xavier Leroy 0802bacf4b
Merge pull request #9551 from nojb/microbfd
Implement (in utils/binutils.ml) a simple parser for ELF, Mach-O and PE shared object files.  Use it to get rid of libbfd in ocamlobjinfo and to improve the checking of external primitives during linking in ocamlc.
2020-07-14 10:47:12 +02:00
John Whitington e870b8a9a9 More check-typo fixes 2020-07-08 15:09:10 +01:00
John Whitington 0f2954b263 Fixes per travis check-typo and travis changes 2020-07-08 14:13:08 +01:00
John Whitington efe8ca02f1 Unify labeled and unlabeled Standard Library modules 2020-07-07 19:34:14 +01:00
Florian Angeletti 75aa1ee0bc
Merge pull request #9712 from Octachron/version_format
New format for the OCaml version string
2020-07-03 10:20:20 +02:00
octachron cd813bc1b0 Update version format 2020-07-02 16:47:03 +02:00
Nicolás Ojeda Bär 0b6ebb3155 Remove integration with libbfd 2020-07-02 06:40:10 +02:00
Nicolás Ojeda Bär 6ab3220a49 make alldepend 2020-07-02 06:40:10 +02:00
Nicolás Ojeda Bär a8f05ad7af Adapt ocamlobjinfo 2020-07-02 06:40:10 +02:00
David Allsopp bfd3d7deb0 Bump FlexDLL submodule to 0.38 2020-06-29 17:06:19 +01:00
Xavier Leroy 8d874fa3bb CI: make "light" test lighter
Also disable shared library support.
2020-06-25 17:13:45 +02:00
David Allsopp 6fc8e07d62
Merge pull request #9692 from nojb/shellquote
Simplify Makefile
2020-06-23 14:39:39 +01:00
Sébastien Hinderer 389f5ee5aa Fix inria/extra-checks CI job
Check-typo was confused by a few binary programs.

this commit calls git clean before (rather than after) running
tools/check-typo to fix this.
2020-06-22 17:49:43 +02:00
Sébastien Hinderer 8087f7f1c5 Build system: simplify installation rules
Now that programs are built with their $(EXE) suffix, their installation
rules can be simplified a bit because most of the programs get installed
under the name they have been built with.
2020-06-18 11:16:58 +02:00
Sébastien Hinderer bdd9ca391e Add the $(EXE) suffix to all programs at build rather than install time
This commit touches neither boot/ocamlc nor boot/ocamllex

It has the side-effect of fixing the cleanup rules which did not use the
$(EXE) extension when removing a file although it was produced with the
$(EXE) extension.
2020-06-18 11:16:55 +02:00
Sébastien Hinderer 41e4dc1dc8 tools/Makefile: stop considering ocamldep and cvt_emit as precious 2020-06-18 11:13:12 +02:00
Sébastien Hinderer c530b74e5e tools/ocamlmktop.ml: make use of the configured extension of executalbes
Before this commit, the name of the compiler to use (ocamlc or ocamlc.exe)
was determined base on the OS type. This commit replaces this by
a mere string concatenation of "ocamlc" and the configured extension
for executable files.

This introduces a dependency of tools/ocamlmktop on the compiler's
configuration module.
2020-06-18 11:07:43 +02:00
Sébastien Hinderer 758ab7d1a6 objinfo: take possible .exe extension into account when calling objinfo_helper 2020-06-18 11:07:43 +02:00
Sébastien Hinderer 92331f8025 objinfo_helper: slightly generalise usage message
Use argv[0] rather than hardcoding "objinfo_helper".

That way the message is accurate whether there is a ".exe" extension or not.
2020-06-18 11:07:43 +02:00
Nicolás Ojeda Bär afcac60650 Get rid of shellquote macro 2020-06-17 19:34:27 +02:00
David Allsopp 2f38a52086
Merge pull request #9625 from dra27/warn-error
--enable-warn-error configure option
2020-06-10 11:32:13 +01:00
Sébastien Hinderer 2e4d1ecc12
Remove two oldish scripts (#9656) 2020-06-09 10:49:58 +02:00
David Allsopp d0051d0092
Fix tools/check-typo for mawk 1.3.4 (#9644)
Closes: #9643
2020-06-05 18:13:40 +02:00
Sébastien Hinderer e32c1b2e8e Inria CI: also test LibBFD support on FreeBSD 2020-06-04 19:13:35 +02:00
Nicolás Ojeda Bär 836d62470b
Fix load path ordering (#9611) 2020-06-03 00:10:38 +02:00
Stephen Dolan 0d44a6cfe6 Remove Const_pointer from Lambda and Clambda (#9585)
Lambda and Clambda distinguish Const_int from Const_pointer only so
that they can pass the information to Cmm. But now that that
Const_pointer is gone from Cmm (#9578), there's no need for the
distinction in Lambda either.

This PR requires a bootstrap, because the .cmo format changes:
Lambda.structured_constant has one fewer constructor.  The bootstrap
is in the following commit.
2020-06-02 11:19:20 +02:00
David Allsopp 75c9cd3b38 Add --enable-warn-error
On by default if +dev appears in VERSION and also fixed for MSVC.
2020-06-01 17:34:41 +01:00
Xavier Leroy b2f467abc0 Improve -with-bootstrap mode
- coreboot + opt.opt gives a faster build than bootstrap + opt.opt
- Restore the original bootstrap compilers on exit, so that
  other-configs works (it performs several builds in sequence).
2020-05-21 17:05:40 +02:00
Xavier Leroy f82a84f3e8 Force a bootstrap for the --disable-flat-float-array test
The default build procedure is broken in --disable-flat-float-array mode
since PR#2188 was merged.  This commit unblocks temporarily the situation
by using a build with bootstrap for --disable-float-float-array-mode.
2020-05-21 15:40:18 +02:00
Xavier Leroy ad804d1c4a Add option "-with-bootstrap"
This option forces a bootstrap of the bytecode compiler before the
whole system is built and tested.
2020-05-21 15:40:13 +02:00
Gabriel Scherer b42541395c Travis CheckDepend: show the difference, not just the problematic files
(No change entry needed)
2020-05-16 22:44:12 +02:00
Xavier Leroy 43f7a263b3 A lightweight variant of the Inria CI script "main"
Tries to build just what's needed to run the test suite.
2020-05-16 19:40:14 +02:00
octachron 0963b0c6b6 Restore ocamloptp 2020-05-14 10:11:42 +02:00
Gabriel Scherer fab58a938a makefiles: move the inclusion of Makefile.build_config in Makefile.common 2020-05-06 12:10:02 +02:00
Xavier Leroy f2587c1fb1
Merge pull request #9529 from dra27/macos-gnu-make
Further C dependency fixes
2020-05-06 09:53:45 +02:00
Xavier Leroy 29d5f485d8 Jenkins CI job to test the Dune-based build 2020-05-05 19:21:42 +02:00
David Allsopp 11d0d662ae Turn on dependency checking on Inria CI
Only the "old school build" test uses --disable-dependency-generation.
This is also tested on both Travis and AppVeyor, so we have good release
coverage checking of this option.
2020-05-03 12:29:23 +01:00
Gabriel Scherer cdccc0b1cb add a new Travis CI check that 'make alldepend' is a no-op 2020-05-01 22:23:28 +01:00
David Allsopp 5efcc1b474 AppVeyor: test dependency generation on msvc64 2020-05-01 09:53:01 +01:00
David Allsopp ac2a9dd188 Cease committing C dependendency information
When building for the first time, the only requirement is that generated
header files have been built (jumptbl.h, version.h and opnames.h).
Detailed dependency information is only required when headers have been
edited.

COMPUTE_DEPS in Makefile.config controls whether C dependency
information should be generated on a per-file basis. This variable is
controlled by a new --disable-dependency-generation in configure which
is enabled for Git checkouts and disabled for tarballs (i.e. releases).

The Microsoft C compiler (cl) cannot generate dependencies in a
consistent way which we can consume, so for a Git checkout configure
searches for an additional C compiler in order to compute dependencies.
This is obviously not required for a user-build.

As a result, the MSVC port can now safely run make alldepend, since only
OCaml dependency information is committed to the repo after this change.

CI does not need to waste time testing the dependency information,
because it only tests a single build. A single Travis job has been added
which tests the build system code to generate the dependency information
(and provides a single `make -j` run in CI, although Inria's CI also
tests parallel building continuously).
2020-04-17 14:11:22 +01:00
David Allsopp 3a40b2fd94 Introduce Makefile.build_config.in
This moves the configure-generated parts of Makefile.common to a
separate (generated) Makefile, allowing Makefile.common to be a normal
Makefile.

OCaml's build system Makefile's now include Makefile.build_config (which
itself includes Makefile.config) but Makefile.config is still installed
as before. This allows configure to generate variables which are
specific to the build process and are not intended to be exported to the
installation.
2020-04-17 13:53:49 +01:00
Enguerrand Decorne b7f0494df5 Rewrite the instrumented runtime to store traces in the CTF format.
The instrumentation code in the instrumented runtime was replaced
with new APIs to gather runtime statistics and output them in a new format
(Common Trace Format).
This commit also exposes new functions in the Gc module to pause or resume
instrumentation during a program execution (Gc.eventlog_pause and
Gc.eventlog_resume).
2020-04-30 10:32:01 +02:00
David Allsopp abd6712f6a
Merge pull request #9491 from dra27/bionic-travis
Switch Travis testing from Xenial to Bionic
2020-04-23 21:17:13 +01:00
Damien Doligez 2d3c211e00 release checklist: fix small problems in branching instructions 2020-04-23 21:28:41 +02:00
David Allsopp c6048eb406 Switch Travis testing from Xenial to Bionic 2020-04-23 15:58:36 +01:00
Damien Doligez e92d13c986 last commit before branching 4.11 2020-04-22 17:28:08 +02:00
David Allsopp 8a36b7ab30 Test distclean in CI
Ensure that distclean works in an unconfigured tree. At the end of the
build, ensure that no tracked files have been altered or untracked files
created and ensure that distclean removes all ignored files.
2020-04-20 11:07:28 +01:00
Nicolás Ojeda Bär 15b08d2fdf
Use Filename.quote_command (#9476) 2020-04-20 14:38:10 +02:00
David Allsopp 014105bf1c Use configure-caches on AppVeyor 2020-04-17 10:16:03 +01:00
David Allsopp db1d8488e6 Run AppVeyor with -j for branches 2020-04-17 09:35:16 +01:00
David Allsopp 644696e041 Display AppVeyor environment 2020-04-17 09:28:05 +01:00
David Allsopp 540df2ee65 Introduce $MAKE to AppVeyor script 2020-04-17 08:58:44 +01:00
David Allsopp 67c011b883
Revert "AppVeyor speed-ups" 2020-04-20 09:55:54 +01:00
David Allsopp eaa2a01eeb Use configure-caches on AppVeyor 2020-04-17 10:16:03 +01:00
David Allsopp 094447b8fe Run AppVeyor with -j for branches 2020-04-17 09:35:16 +01:00
David Allsopp 1850f55c58 Display AppVeyor environment 2020-04-17 09:28:05 +01:00
David Allsopp afe92bb4f3 Introduce $MAKE to AppVeyor script 2020-04-17 08:58:44 +01:00
David Allsopp f568f858f4 Update release-checklist 2019-10-15 12:04:04 +01:00
David Allsopp 13786d7d12 Ensure make distclean works on an unconfigured tree 2019-10-15 11:46:36 +01:00
David Allsopp 91913bc505 autogen -> make configure 2018-12-04 10:29:02 +00:00
David Allsopp d4a566573f Allow make to be invoked before configure
This should be improved to give better warnings for when Makefile.config
and Makefile.common are required.
2018-12-04 10:28:36 +00:00
Nicolás Ojeda Bär 57d329e07b
Deprecate -annot (#2141)
* Move driver code from Cmt2annot to Read_cmt
* Move cmt2annot.ml into typing/
* make depend
* Use standard error handling
* Move specific logic to read_cmt
* Do not pass full cmt record as argument
* Better locations
* Emit .annot files produced from cmt data
* Remove direct calls to Stypes
* Deprecate -annot
* Changes
* make depend
* Adapt doc
* make -C tools depend
2020-03-13 12:59:34 +01:00
David Allsopp fd6c0e3a03 Don't built ocamltest on release builds
--enable-ocamltest is paranoidly included in the CI scripts, although
the trees are never pushed with a release VERSION at the tip.
2020-02-13 16:53:07 +00:00
Stephen Dolan d6a3a8c58e
Merge pull request #9277 from dbuenzli/objinfo-c-metadata
Objinfo c metadata
2020-02-04 15:53:37 +00:00
Daniel Bünzli 47b9410b33 objinfo: print cm[x]a extra C object, options and dlls in the cli order.
Follow up to #4949. Closes #9276.
2020-01-31 15:12:47 +01:00
Florian Angeletti 5302b09764
ci: check the prefixing policy for runtime symbols (#9260)
* ci: check runtime symbol policy on travis and Appveyor
* tune check-symbol-names:
** ignore all local symbol
** ignore Caml_ prefix
** ignore x86: pic-related symbols
** windows: ignore debugging, unicode and wmain symbols
2020-01-29 15:30:15 +01:00
Sébastien Hinderer a831ba1adc objinfo_hellper fix
This commit modifies objinfo_helper so that the caml_plugin_header
symbol is also looked up in the static symbol table, if it is
not found in the dynamic one.

This is useful e.g. on Windows where the symbol can not be found
without this commit.

It is also necessary to look for the _-prefixed version of the symbol.
2019-12-17 10:10:14 +01:00
Sébastien Hinderer 6953721e5d objinfo_helper: introduce an error function 2019-12-17 10:08:55 +01:00
Gabriel Scherer e3ae18a4e5 (verbosely) document the release-time manual curation process 2019-12-07 17:07:02 +01:00
Fourchaux 1f9474c63c Fixing typos (#9162) 2019-12-04 19:38:02 +00:00
Gabriel Scherer f572295def
Merge pull request #463 from gasche/robust-ocamlobjinfo
objinfo: tell when the object file comes from a different OCaml version
2019-12-03 10:36:13 +01:00
Gabriel Scherer 443a9de638 [minor] objinfo: use Fun.protect instead of Misc.try_finally 2019-12-03 00:08:30 +01:00
Gabriel Scherer 314154ad69 objinfo: tell when the object file comes from a different OCaml version
When passed an object file that comes from a different OCaml version,
objinfo will currently just detect that the magic number is not what
it expects, and claim it is not a valid file. This is irritating.

The error message output by objinfo now looks like this:

    File /home/gasche/.opam/4.08.0/lib/astring/astring.cmi
    Wrong magic number:
    this tool only supports object files produced by compiler version
    	4.11.0+dev0-2019-10-18
    This seems to be a compiled interface file (cmi) for an older version of OCaml.
2019-12-03 00:08:30 +01:00
Sébastien Hinderer 69316099b0 Fix BFD support on OpenBSD 2019-11-28 16:20:03 +01:00
Florian Angeletti b768c0be59 Highlighting in the manual
* Replace caml-sl with the standard listings package
and ulem package
* update caml_tex to output nicer latex code
* simplify escaping in caml_tex
2019-11-28 11:45:08 +01:00
Gabriel Scherer 05f15cf215
Merge pull request #8820 from Drup/stringquot
Quoted extensions
2019-11-25 21:26:53 +01:00
Drup 9c8b63f4ce Annotated Asttypes.constant's string with content location. 2019-11-13 16:08:40 +01:00
Gabriel Scherer 4f37f9ee2b README: new badges for 4.10 and 4.09
(no change entry needed)
2019-11-09 11:08:51 +01:00
Gabriel Scherer 312253ce82 split patterns into "value patterns" and "computation patterns"
Value patterns match on a value (the result of computation), while
computation patterns handle the effects (hint hint) of
a computation. The only forms of computation patterns in OCaml today
are value patterns and exception patterns (exception p).

The sub-pattern `p` of the `lazy p` construction should be
a computation pattern, rather than a value pattern. This pull-request
does not make this change.

Most of the changes in this PR are boilerplate -- it really is a lot
of work now to add a new syntactic category to the typed-tree
syntax. This boilerplate is fairly automatic and should be easy to
review.

There is a subtle part to the patch, though: the implementation of the
pattern type-checking. It now has to reconstruct the value/computation
distinction (absent from the parse-tree), and return values from two
different types. Instead of splitting the type-checker in several
functions (which risked code duplications), I choose to use a GADT to
have the same [type_pat] function return two different types depending
on the caller. This is the least invasive way to adapt this part of
the codebase, whose inherent complexity is so large (unfortunately)
that adding a GADT to the mix barely makes a difference.
2019-10-31 13:29:16 +01:00
Florian Angeletti 7a9e887eda release-checklist: github branch protection 2019-10-23 16:59:59 +02:00
Florian Angeletti ea55b8b590 release-checklist: more info for branching 2019-10-22 18:15:59 +02:00
Florian Angeletti 5c53a18390 release-checklist: inria ci 2019-10-21 16:37:20 +02:00
Xavier Leroy 7b3a147cee extra-checks: update to clang 9
Also, disable man page generation on the sanitized runs to save a bit of time.
2019-10-20 19:30:03 +02:00
Jacques-Henri Jourdan 5a53560e7d Fix address sanitizer check on INRIA CI (#9053)
Since the new stack overflow detection system (#8670), ASAN was confused.
We fix the issue by telling ASAN to not use a sigaltstack, and by disabling
ASAN on functions used by the stack overflow handler.
2019-10-19 11:39:30 +02:00
Thomas Refis 8e928caea7
a better representation for modules with no name (#8908) 2019-10-09 14:15:37 +01:00
David Allsopp 4f09104d88 Allow by-host worktree-sharable configure caches
The Git configuration value ocaml.configure-cache can be used to specify
a directory to keep autoconf cache files in, relative to the worktree
root (so `git config ocaml.configure-cache .` enables the feature, and
`git config --global ocaml.configure-cache ..` enables it for all
worktrees, assuming they're at the same level).

autoconf's --cache-file option speeds up future runs of configure by
caching the results of previous tests. The cache is invalidated if any
environment variables differ (e.g. LDFLAGS) or if the build-host-target
triplet differs. This is a nuisance on Windows, where configure is both
very slow and it's also common to build with multiple different --host
values.

This PR allows a tree to be quickly reconfigured from one Windows port
to another.
2019-10-05 14:50:57 +01:00
David Allsopp 345fd4c3f9 Allow Git config options to be passed to configure
The Git configuration value ocaml.configure is now passed to the
configure script's arguments before $@ if (and only if) OCaml is being
configured from a Git clone.

This allows, for example:

- Developer-specific preferences (e.g. `--disable-ocamldoc` or
  `--disable-debug-runtime`)
- Automatic use of autoconf cach files (-C option)

It is implemented by inserting a test at the top of `configure`, which
is bypassed if `.git` doesn't exist.
2019-10-05 14:50:35 +01:00
David Allsopp fb6f58ea69
Merge pull request #8951 from shindere/make-default-target
Let make's default target build the compiler
2019-10-04 14:23:27 +01:00