Commit Graph

698 Commits (master)

Author SHA1 Message Date
Nicolás Ojeda Bär 540996d21e Remove Spacetime 2020-10-08 20:28:12 +02:00
Bernhard Schommer b727f422bd
Do not install VERSION file. (#9895)
The installed VERSION file could clash with a C++20 standard header.

Fixes: #9523
2020-10-02 15:41:34 +02:00
Jeremy Yallop 86fe4bdead Add 'toplevel' directory to 'make runtop'. 2020-08-21 12:37:26 +01:00
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
Sébastien Hinderer f3ff1337a1 Build system: honour the CFLAGS and CPPFLAGS build variables
With this commit, it becomes possible to provide C compiler and preprocessor
flags to use in addition to those defined by the build system.

As required by the GNU coding standards, the flags can be provided
either at configure or at make invocation.

The provided CFLAGS and CPPFLAGS will also be taken into account
when C code is compiled by ocamlc/ocamlopt.

This commit removes the explicit reference to CFLAGS in the
configuration for the xlc compiler, since it is not necessary any longer.
2020-08-06 14:30:50 +02:00
Sébastien Hinderer df9d60f315 Get rid of the YACCFLAGS build variable
It was not used, except in lex/Makefile where this commit replaces its
unique occurrence by its definition in the same file.
2020-08-05 14:46:40 +02:00
Xavier Leroy e9754b0fb7
Bootstrapping FlexDLL when new primitives have been added (#9700)
Under Windows, it is possible to build FlexDLL from sources while
OCaml is building from sources too.  This is used for our Appveyor CI,
in particular.

However, the current build procedure assumes that the OCaml bootstrap
is stable, and in particular that boot/ocamlc knows about all the primitives
defined by runtime/ocamlrun and used in stdlib.

This commit lifts this assumption and enables FlexDLL to be bootstrapped
even if the OCaml bootstrap is not there yet.  This unblocks Appveyor CI
in this case.
2020-06-23 08:23:12 +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 2ee6e82925 Makefile: avoid one recursive invocation of make
The `core` target can depend on `coldstart` rather than invoking
`$(MAKE) coldstart` as its first command.
2020-06-18 11:07:43 +02:00
Sébastien Hinderer 1c158f4227 Makefile: introduce the CMPBYT variable 2020-06-18 11:07:43 +02:00
Sébastien Hinderer d9dc10ef0b Fix distclean rule
Commit 13786d7d12 accidentally removed a file twice.
2020-06-18 11:07:43 +02:00
Sébastien Hinderer b94a3776a0
Remove temporary installation hacks (#9659)
* Remove temporary hack related to the Num library

This is a follow-up to commit 3de0115bfe

* Also do some cleanup in stdlib/Makefiile
2020-06-10 16:42:53 +02:00
Gabriel Scherer 67f6128ebd [minor] Makefile: move ARCH_SPECIFIC back to the main Makefile
(This is a small, independent readability fix.)

ARCH_SPECIFIC was moved into Makefile.compilerlibs by mistake; it is
not used in Makefile.compilerlibs (in particular the
ARCH_SPECIFIC_ASMCOMP_* variables do not depend on it), and it is used
in the main Makefile.
2020-05-06 12:10:02 +02:00
Gabriel Scherer 8d716a1712 Makefile: no need for REQUIRES_CONFIGURATION check on config.status
Now that Makefile.build_config is only included when configuration is
required, we can remove the REQUIRES_CONFIGURATION logic here.
2020-05-06 12:10:02 +02:00
Gabriel Scherer 472a20d735 [minor] rename CAN_BE_UNCONFIGURED into REQUIRES_CONFIGURATION 2020-05-06 12:10:02 +02:00
Gabriel Scherer fab58a938a makefiles: move the inclusion of Makefile.build_config in Makefile.common 2020-05-06 12:10:02 +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
Nicolás Ojeda Bär 8f3833c4d0
Add RISC-V native-code backend (#9441)
This is a port of ocamlopt for the RISC-V processor in 64-bit mode.
2020-04-24 16:04:50 +02:00
Greta Yorsh b823c8d8fc Remove stray newlines 2020-04-20 13:56:53 +01:00
Greta Yorsh 44af4aea7c Check FUNCTION_SECTIONS in Makefile.common.in to update OPTCOMPFLAGS 2020-04-20 13:56:53 +01:00
Greta Yorsh 7465e9f2c7 Define OPTCOMPFLAGS in Makefile.common.in 2020-04-20 13:56:53 +01:00
David Allsopp 9c5d7c1112 Correct implementation of --disable-stdlib-manpages 2020-02-26 15:07:17 +00:00
David Allsopp a2ddf5571b Only enable for required targets 2019-10-15 12:04:19 +01:00
David Allsopp 13786d7d12 Ensure make distclean works on an unconfigured tree 2019-10-15 11:46:36 +01:00
David Allsopp b1c78c041f Clean-up autoconf files in make distclean 2018-12-04 11:01:52 +00: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
David Allsopp b03c1c78c7 Add --disable-ocamltest 2020-01-16 16:50:27 +00:00
Gabriel Scherer cfb67f8153 Makefile: move the targets for compilerlibs archives to an included Makefie 2019-12-26 14:32:33 +01:00
David Allsopp 9ebb105797 Display the configure error once in make -j 2019-11-12 12:52:41 +00:00
Gabriel Scherer b0d1d6084c Makefile: install all compiler-libs archives instead of a manual listing
The issue #9050 comes (partly) from #2281 forgetting to add the
compilerlibs/ocamlmiddleend archives in the installation target. The
present patch should solve this issue once and for all, by using
a wildcard to install all archives that have been built in
compilerlibs/, instead of using a manual listing.

Compared to trunk, the following extra files are installed in
$(LIBDIR)/compilerlibs: ocamlmiddleend.{a,cma,cmxa}. There are no
other changes in the installed-files list.
2019-10-29 18:07:51 +01:00
Thomas Refis 79f1c73462
Warn about unused functor parameters (#8891) 2019-10-14 11:11:01 +01:00
Gabriel Scherer 0bc3e66d9c Makefile: minor fix to the ocamltest rules
(make -C ocamltest) will run the first rule of the ocamltest Makefile,
which happens to be the 'all' rule. This is not robust to the addition
of new rules in some of the included Makefile, and indeed a previous
version of the previous commit broke it inadvertently.
2019-10-12 10:23:29 +02: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
Vincent Laviron 60f58174ba
Split cmmgen into generic cmm helpers and clambda-specific transformations (#1963) 2019-10-04 17:49:59 +02: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
Sébastien Hinderer 987b0814d7 Let make's default target build the compiler
This commit makes it possible to build the OCaml compiler according to
its configuration by simply runnning make. There is no need to specify
neither world nor world.opt explicitly, although the two targets
remain available.

This commit also introduces (and starts making use of) the
NATIVE_COMPILER build variable whosse value is true when the native
compiler is enabled and false otherwise.
2019-09-30 16:01:29 +02:00
Florian Angeletti a509157eb9 share argument implementation across executable
This commit defines five default argument modules in
Main_args.default. Those modules provide a default implementation
for the argument of ocaml, ocamlnat, ocamlc, ocamlopt, ocamldoc,
ocamlcp, ocamloptp, and expect_test.

Grouping together those implementations allow to share as much as
possible similar implementation across executables. It should make
easier to keep synchronized the various implementation, or reuse
those implementation in alternative drivers.
2019-09-30 15:56:40 +02:00
David Allsopp 4047336bfe Windows supports make reconfigure now 2019-09-29 15:44:53 +01:00
David Allsopp 7b078dedd8 check-parser-uptodate-or-warn.sh: improve shell script 2019-09-26 08:26:02 +02:00
David Allsopp 9490f7a89a check-parser-uptodate-or-warn.sh: Use make syntax for ignoring errors 2019-09-26 08:25:46 +02:00
Gabriel Scherer 3f77dade9f make check-parser-uptodate-or-warn.sh more robust to script failures 2019-09-25 15:01:07 +02:00
Jeremie Dimino 2d31ebfc8b Add support for [@@immediate64]
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-09-24 07:56:15 +01:00
Gabriel Scherer 3be535c273
Merge pull request #8870 from gretay-js/linear
Split Linearize into two modules
2019-09-09 11:26:20 +02:00
Greta Yorsh bf0a885d03 Install artifacts from asmcomp/debug 2019-09-06 16:07:34 +01:00
Greta Yorsh 0b6b544fcb Split Linearize into two modules
Separate the description of the IR from the transformations
performed on it by moving type declarations from linearize.ml
into their own file, called linear.ml.
2019-09-04 11:55:11 +01:00
Gabriel Scherer 2bbf7caa72 ocamldoc: build manpages explicitly in root Makefile 2019-08-30 09:57:18 +02:00