Commit Graph

643 Commits (c19e8b23506e38fc47c110138d50b57fe93f7d7e)

Author SHA1 Message Date
Greta Yorsh 351edb49bb Add compile-time option -function-sections 2019-07-15 10:25:26 +01:00
David Allsopp 668055de77 Missing beforedepend dependencies for Menhir
Ensures that Menhir's sources are in place for a "from scratch"
`make alldepend`
2019-06-24 07:55:15 +01:00
Gabriel Scherer 8ba174facf Makefile: ocamllex does not depend on ocamlc, it uses BOOT_OCAMLC
It seems that the dependency was introduced in 1998
  87b17301f4
and it was already unnecessary at the time.
2019-06-24 08:17:58 +02:00
David Allsopp 93ee6b43b0
Move AST testing rules to Makefile.dev (#8743)
Makefile.dev is only included if a Git clone is detected.

make evaluates macros in target specifications when the Makefile is
read, which meant that the build-all-asts target caused `git ls-files`
to be called on every invocation of make. This tweaks it to be a
recursive call to make which puts the $(AST_FILES) macro in the recipe
where it is only evaluated when the target is requested.
2019-06-18 14:35:06 +01:00
David Allsopp 1fd3ddf8a0 Drop dependency utils/config.ml <-- Makefile
The recipe is trivial, so the dependency promotes unnecessary rebuilding.
2019-06-16 16:29:17 +02:00
David Allsopp 5231ae1283 Always build flexdll/flexlink.exe with camlheader 2019-06-10 11:17:54 +01:00
David Allsopp 627608a00a Missing -nostdlib options in flexdll bootstrap
If OCaml was already installed, camlheader would be used from the
installation when building the bytecode flexdll/flexlink.exe
2019-06-10 11:17:54 +01:00
Mark Shinwell 6cbdfad125 Move some code from Asmgen to the middle end directory etc. (#2288)
Followup to (#2281)
2019-05-10 15:11:22 +02:00
Sébastien Hinderer a201ade7f3 Build system: make ocamllex silent by default (#8664)
This commit makes e.g. make -s world.opt completely
silent when everything works, in order to increase the visibility of
any unexpected message occurring during the build.
This will be useful for instance during CI, in particular it should
make it easier to catch undefined build variables.

The implementation is straightforward. The OCAMLLEX_FLAGS variable is
defined in Makefile.common.in and then used consistently by all
lexing recipes.

In addition, in tools/Makefile, the two rules producing the lexers
from cvt_emit.mll and make_opcodes.mll have been replaced by a
pattern-rule and the useless .SUFFIXES target has been removed.
2019-05-07 11:32:05 +02:00
Xavier Leroy 01f2ac8d70 Check that native-code is supported in world.opt
Previously, if the native-code compiler is not supported
(e.g. because configure doesn't recognize the target architecture,
or is run with --disable-native-compiler), "make world.opt"
fails late and with a mysterious error message
(a warning about undeclared C functions in runtime/roots_nat.c
or runtime/backtrace_nat.c, typically).

This commit ensures that "make world.opt", "make opt" and "make opt.opt"
fail immediately with a meaningful error message if the native-code
compiler is not supported.

Note: in "world.opt", make sure that "checknative" is run, and only
then "coldstart"; don't run them in parallel.
2019-05-02 19:43:17 +02:00
Thomas Refis 8ee36fe2db turn off warning 40 2019-04-16 10:41:35 +01:00
Nicolás Ojeda Bär 8897fe60cc make clean: do not remove emacs backups 2019-04-10 14:18:04 +02:00
Mark Shinwell 72ea849d2a
Move some middle-end files around (#2281)
* Various file moves in the middle end: this is the first stage of improving separation between the middle end and backend.
* Creation of file_formats/ directory (with associated file moves) to hold the definitions of compilation artifact formats.
* Creation of lambda/ directory (with associated file moves) to hold Lambda language definition files, transformation passes and construction passes from Typedtree.
* Disable (hopefully temporarily) dynlink, debugger and ocamldoc for the dune build.
2019-04-01 17:18:47 +01:00
Isaac Avram 87f999734b Merge remote-tracking branch 'origin/trunk' into tast_iterator2 2019-03-25 13:49:04 -07:00
Isaac Avram 8468464354 Updated Makefile 2019-03-23 19:12:43 -07: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 e3a62eef91
Add Compute_ranges pass (#2291) 2019-03-18 08:52:34 +00: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
Nicolás Ojeda Bär 612dbf1b74 Makefile: adapt to removal from vmthreads 2019-03-11 20:52:17 +01:00
Mark Shinwell 7cb0da58f1
Don't generate Clambda constants during Cmmgen, etc. (#2280) 2019-03-05 17:09:40 +00:00
David Allsopp 8831395f32 Move FLEXDLL_DIR definition to utils/Makefile (#2259)
Missed in d68e0e207. Fixes second part of MPR#7923.
2019-02-28 11:21:52 +01:00
Mark Shinwell 3133699187
Add bytecomp/opcodes.mli (#2265) 2019-02-26 16:17:38 +00:00
Gabriel Scherer 93f0ce31bb env refactoring: separate the cmi/crc handling into a persistent_env module
Persistent_env is a new module that handles the relation between the
type-checking state and the "persistent" typing information laying in
.cmi files on the filesystem. In particular, it handles the collection
and production of CRC information for the .cmi files being read and
written to the filesystem; the using modules (in our case, only Env)
are in charge of turning the cmi files into higher-level information
(components and signatures).

Persistent_env exposes a type `'a t` of a persistent environment,
which acts as a mutable store of `'a` values. There is no global state
in the module itself: while Env (and thus the OCaml type-checker) uses
a single global persistent environment, it should be possible to
create several independent environments to represent, for example,
several independent type-checking sessions.
2019-02-18 17:02:47 +01:00
Pierre Chambart 45b28a90b2 Move Semantics_of_primitives into asmcomp 2019-02-11 17:16:44 +01:00
Pierre Chambart 6dfd40f72f Push clambda_primitives to flambda 2019-02-11 17:16:44 +01:00
Pierre Chambart db80c8e15f Define and use Clambda_primitives
The primites for Clambda are now different from lambda ones. This will
now allow to clean those that don't make any sense in the backend.
2019-02-11 17:16:43 +01:00
Vlad Frolov 925c7dcf20
[Makefile] Fixed a bug in partialclean target 2019-02-04 00:06:42 +02:00
Jeremie Dimino 7e0862a212 Refactor load path management and initial environment
- Add a Load_path module which caches files lookup

- Instead of falling back to the external environment, allow to
  declare in the environment that a module comes from the external
  world. This allows persistent structures to shadows non-persistent
  ones
2019-01-30 16:36:38 +00:00
Nicolás Ojeda Bär 9eda39597a Remove explicit dependencies 2019-01-12 20:50:36 +01:00
Nicolás Ojeda Bär 0998b3ac4e Remove unnecessary compilation rules 2019-01-12 08:59:34 +01:00
Nicolás Ojeda Bär fe617f638f Remove unnecessary ocamldep call 2019-01-12 08:57:12 +01:00
Nicolás Ojeda Bär 8cc9013688 Do not call ocamldep on non-existing files 2019-01-12 08:57:12 +01:00
Gabriel Scherer 46ef054330 Makefiles: restructure CAMLDEP usage to easily add flags
This change should be a refactoring no-op.

Before, a DEPFLAGS variable existed in some makefiles to contain
include directories to be passed to ocamldep invocations, but no
support for easily adding command-line flags to ocamldep was available
(invocations would systematically use -slash, which was duplicated
across callsites).

With this PR, a new DEPINCLUDES variable contains the include
directories, and DEPFLAGS is repurposed to contain other command-line
flags for the tool -- currently "slash".
2018-12-12 09:30:55 +01:00
David Allsopp a875e64571 Missing clean items from GPR#1063 2018-12-06 18:14:38 +00:00
Thomas Refis af328e176b
remove typedtreeMap (#2173) 2018-11-29 15:51:45 +01:00
Rodolphe Lepigre ca227428f4 Typedecl: split immediacy to a separate unit Typedecl_variance
get_unboxed_type_representation is used in several other modules, and
split into its own Typedecl_unboxed unit.

(pair-programming with Gabriel Scherer)
2018-11-23 12:05:33 +01:00
Gabriel Scherer 24ea989c02 Typedecl: split variance to a separate unit Typedecl_variance
(pair-programming with Rodolphe Lepigre)
2018-11-23 12:05:33 +01:00
Gabriel Scherer 0e0b10fd75 Typedecl: split abstract properties to a separate unit Typedecl_properties
(pair-programming with Rodolphe Lepigre)
2018-11-23 12:03:11 +01:00
Gabriel Scherer f6837be875
Merge pull request #2151 from fpottier/improvements
Parser improvements, with a possible bug fix along the way.
2018-11-22 08:23:58 +01:00
Thomas Refis 5daea80728 fix partialclean for compdynlink_common (review and approved by mshinwell) 2018-11-20 15:46:48 +00:00
Thomas Refis aa77d3b93d
fix dune build following natdynlink modifications (#2154)
- silence some principality warning in otherlibs/dynlink
- shared some script between the makefile and the dune files
2018-11-20 15:06:47 +01:00
François Pottier de8df5dbb0 Exclude `boot/menhir/parser.{ml,mli}` from the list of source files
used by `make build-all-asts` and related commands.

Indeed, the idea is to check that the ASTs do not change when the parser is
modified -- the parser's source itself, if included, would always produce a
false positive.
2018-11-20 11:52:47 +01:00
Mark Shinwell 690116890e Various Makefile / dependency fixes 2018-11-15 10:42:49 +00:00
Mark Shinwell 960cef2e7d Fix makefile problems 2018-11-14 16:20:06 +00:00
Mark Shinwell a4c88eab27 Fixing dynlink makefiles 2018-11-14 13:10:08 +00:00
Mark Shinwell 6526a0c3d9 Make (nat)dynlink sound 2018-11-12 17:44:26 +00:00
Gabriel Scherer d4959ae5ff Makefile: reuse new rules of otherlibs/Makefile 2018-11-12 16:28:01 +01:00