Commit Graph

141 Commits (9e181ca8f446d238ba279bc22fef9d166d4f38b0)

Author SHA1 Message Date
David Allsopp 9bc33d945a Add Ocamltest_stdlib.Unix.has_symlink
Replaces the duplicated C stub. Functions from Unix must be explictly
imported.
2020-07-23 14:55:36 +01:00
David Allsopp 9a7a17c012 Add Sys.mkdir 2020-07-21 14:15:40 +01:00
Nicolás Ojeda Bär 0b6ebb3155 Remove integration with libbfd 2020-07-02 06:40:10 +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
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
Florian Angeletti e667d9fb8d debugger: rename parser and lexer modules 2020-01-06 14:14:55 +01:00
Sébastien Hinderer 1c0424c80e ocamltest: draft of reference manual (tutorial section) 2019-11-28 18:04:53 +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
Stephen Dolan 5ad64306d3
Merge pull request #8713 from kayceesrk/r14-globals
Move C global variables to a dedicated structure
2019-08-27 13:30:22 +01:00
Jacques-Henri Jourdan afa590cc7d Get rid of /bytecomp/runtimedef.ml in .gitignore
This file is no longer generated since #2281, and keeping an old one
makes `make depend` produce an invalid file.

No change entry needed
2019-08-25 17:25:44 +01:00
KC Sivaramakrishnan 8ab825d7e9 Fix makefile, gitignore and a stray extern declaration 2019-08-23 09:50:05 +05:30
Stephen Dolan 35ea7eb9a4 Avoid rebuilding the world when files containing primitives change. 2019-05-27 13:24:41 +01:00
Gabriel Scherer 01b93c8596 Revert "Merge pull request #8690 from stedolan/primitives-rebuilding"
This reverts commit 74cf20429d, reversing
changes made to 295ee133dd.
2019-05-23 10:54:00 +02:00
Stephen Dolan e3d2c28ad9 Avoid rebuilding the world when files containing primitives change. 2019-05-22 16:05:48 +01:00
Sébastien Hinderer 3e52e4e6a8 Remove the scrapelabels and addlabels tools 2019-05-07 11:49:44 +02:00
Sébastien Hinderer 6f2d142df2 Remove the ocaml299to3 tool 2019-05-07 11:49:44 +02:00
Xavier Leroy c2309906ea Ignore generated file lambda/runtimedef.ml 2019-04-02 10:01:34 +02:00
Stephen Dolan f495bfb7cb
Merge pull request #8514 from stedolan/boot-ocamlc-opt
Use boot/ocamlc.opt for building, if available.
2019-03-22 12:22:14 +00:00
Stephen Dolan 46c427f519 Use boot/ocamlc.opt for building, if available. 2019-03-20 10:31:46 +00:00
Mark Shinwell dbede46c2e
Improve the packing mechanism used to build Dynlink (#2268) 2019-03-19 10:26:35 +00:00
Jérémie Dimino c413136fa3 Delete otherlib/{graph,win32graph} (#2318)
The Graphics library is now distributed as a separate package.
The sources are at https://github.com/ocaml/graphics .

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-18 15:05:57 +01:00
Mark Shinwell 36c163248d Remove support for compiler plugins (#2276)
After consultation on the core developers' list I am proposing this patch to remove support for compiler plugins.

The main motivations for removing compiler plugins are:
- They are a potential security risk.
 - They increase the complexity of the build system and make maintenance of the Dynlink libraries more difficult (although actually, this complexity could probably be reduced after #2268 is merged).
 - Many applications of plugins should be able to be expressed by building custom compiler drivers that link against compilerlibs.

* Remove compiler plugins and hooks
* Add new function Dynlink.unsafe_get_global_symbol but keep it outside the documented API.
* Remove otherlibs/dynlink/nodynlink.ml
* Update Changes
2019-03-13 11:46:37 +01:00
Mark Shinwell 3133699187
Add bytecomp/opcodes.mli (#2265) 2019-02-26 16:17:38 +00:00
Sébastien Hinderer cc3f70b705 Use autoconf to generate the compiler's configuration script 2018-12-21 16:02:47 +01:00
Mark Shinwell d6181f3e25 .gitignore 2018-11-15 10:57:10 +00:00
Mark Shinwell 690116890e Various Makefile / dependency fixes 2018-11-15 10:42:49 +00:00
Florian Angeletti cc76bb2396 ocamldoc makefile: clean pdf and texi docs 2018-11-06 13:45:25 +01:00
Thomas Refis d68e0e2077
Provide a way to build the bytecode compiler using Dune (#2093) 2018-10-10 16:16:00 +01:00
Sébastien Hinderer ba6362a07d Move config/Makefile to Makefile.config
In order to prepare the transition to autoconf, this commit moves the
configuration Makefile out of the config directory which will disappear
and gives it the name it will have once intstalled, namely Makefile.config.
2018-09-17 14:23:35 +02:00
Gabriel Scherer ef00dc7317 remove experimental/
This subdirectory was used to store experimental patches on some older
version-control system where branching (or discussing branches?) was
inconvenient. It doesn't make much sense anymore now, and getting rid
of it simplifies a couple places that had to grow around it.

Suggested-by: Nicolás Ojeda Bär

(no change entry needed)
2018-09-08 16:53:08 +02:00
octachron 075bf9bed6 doc: remove unprefix trick 2018-09-03 13:59:32 +01:00
Gabriel Scherer cbb92d2817 remove unused ocamlyacc dependencies, never put it in boot/ 2018-09-01 23:17:06 +02:00
Gabriel Scherer d09349f631 rename parsing/parser_menhir into parsing/parser 2018-09-01 23:17:06 +02:00
Gabriel Scherer f571282d7d menhir parser: rename MenhirLib into CamlinternalMenhirLib
The goal of this change is to avoid conflicts encountered by
compiler-libs users that would also use their own MenhirLib runtime
for their own parsers.

I first tried to implement a solution to this module-name-conflict
issue using module aliases and -open, but this proven too fragile and
too difficult to get right.
2018-09-01 23:17:04 +02:00
Gabriel Scherer a16523469a udpate .depend and .gitignore for menhir files 2018-09-01 23:17:03 +02:00
Francois Berenger 5b884d6244 Unix fsync (#1839)
* added otherlibs/unix/fsync.c and otherlibs/unix/unix.ml

* add Unix.fsync

* added otherlibs/win32unix/fsync.c

* Unix.fsync for windows

* big typo

* Rewrite Unix.fsync stub for Windows

* belts and braces: fail in the case of named pipe

* Add missing include

* corrected header

* better ocamldoc for fsync

* rm fsync.c from the UNIX_FILES list

* updated Changes for Unix.fsync

* Use _commit instead of FlushFileBuffers

* Include <io.h>
2018-07-31 07:57:21 +02:00
Florian Angeletti 4be6cafcc3
manual, code example preprocessor : full conversion to compiler-libs (#1863)
* manual tools: use toploop directly in caml_tex2
* manual tool: improved error messages
* manual: always print errors and warnings
* fix nefarious interaction with GPR#1120
* move manual/tools/caml_tex2 to tools/caml_tex
* Basic text for caml-tex
2018-07-25 10:38:08 +02:00
Sébastien Hinderer 76db83e384 Remove /package-macosx from .gitignore -- no longer relevant 2018-07-02 13:36:04 +02:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00
Sébastien Hinderer 507f27ccb0 Makefile, .gitignore: remove `make backup` leftovers 2018-06-20 17:16:35 +02:00
Sébastien Hinderer e09d24d270 Remove ocamlbuild leftovers in .gitattribute and .gitignore 2018-06-20 17:08:07 +02:00
Nicolás Ojeda Bär 6ab67ad4f9 Port win-unicode test to ocamltest 2018-05-22 07:13:50 +02:00
Sébastien Hinderer 342dc8f941 Update .gitignore
This is a follow-up to GPR #1784. Since config/auto-aux/hashbang4
is now removed by ./configure, it does not need to be in .gitignore
any longer.
2018-05-19 10:16:16 +02:00
Sébastien Hinderer 3dc7ac6c70 .gitignore cleanup
This commit removes the entries related to testsuite/tests/ that
are no longer useful.
2018-04-27 17:59:08 +02:00
Sébastien Hinderer 3c98b3cb9c testsuite: move the codegen tool from the tests/asmgen to the tools directory 2018-04-26 20:58:14 +02:00
Sébastien Hinderer dac0778baa Migrate the unboxed-primitive-args test to ocamltest 2018-04-26 08:08:20 +02:00
Sébastien Hinderer e8f3a76f3a Migrate the unwind test to ocamltest 2018-04-25 20:59:25 +02:00