Commit Graph

82 Commits (master)

Author SHA1 Message Date
Greta Yorsh 855c13cd6e
ability to restart compilation from .cmir-linear IR files 2020-10-13 15:07:13 +02:00
Greta Yorsh 04bceec6cc
Save Linear IR before emit (#8939)
* Save IR before emit

* Update .depend for linear_format

* Test for -save-ir-after command-line option

* Address review comments

* Add Changes entry
2020-10-07 11:32:40 +01:00
Stephen Dolan 81618f7b61 Move code of main and optmain to compilerlibs 2020-06-30 10:57:09 +01:00
Gabriel Scherer 8938886721 -dno-locations: hide source locations (and debug events) from IR dumps
This PR was tested with also the -dsel, -dlinear output (also fixed to
not-print locations), but the output is architecture-dependent so this
part of the test was removed.
2020-01-09 15:25:16 +01:00
Greta Yorsh a992599c6c Rename stop_after_pass_names to available_pass_names 2019-11-04 10:53:10 +00:00
Greta Yorsh 7c11fcbdd1 Stop before emit 2019-10-30 15:27:29 +00:00
Nicolás Ojeda Bär 3aff5141fd Add a new -output-complete-exe option (#8872)
This option allows to build self-contained bytecode executable and is aimed to replace `-custom`. The main difference between the two is that executables produced by `-output-compete-exe` can be stripped.
2019-09-25 08:07:31 +01:00
Greta Yorsh 351edb49bb Add compile-time option -function-sections 2019-07-15 10:25:26 +01:00
Lucas Pluvinage e61263c0ac Introduce the -without-runtime option. 2019-05-06 14:35:57 +02:00
Mark Shinwell 2cc1ea26b9 Remove gprof support (#2314)
This commit removes support for gprof-based profiling (the -p option to ocamlopt).  It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
2019-03-16 19:56:53 +01:00
Mark Shinwell 0bd539ae24 GPR#2082: New option -no-insn-sched 2019-03-13 15:03:49 +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
Jérémie Dimino 705054b346 Delete the vmthreads library (#2289)
* Delete the deprecated vmthreads library

It was deprecated in 4.08.

* Remove the byte/native argument of init_path

It is no longer necessary.

* Error out when passing --{enable,disable}-vmthreads to ./configure

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-11 19:38:16 +01:00
Armaël Guéneau 00411d41f4 ocamltest: explicitly set OCAML_ERROR_STYLE
Explicitly set OCAML_ERROR_STYLE to its default value when running tests,
instead of inheriting the one coming from the outside environment.
2019-02-27 15:13:56 +01:00
Armaël Guéneau 6b16bcc4fe Add option -error-style and environment variable OCAML_ERROR_STYLE 2018-10-20 17:11:35 +02:00
Mark Shinwell 298ffe3f68
Phantom let support in Clambda (#2060) 2018-10-15 12:50:06 +01:00
Gabriel Scherer 294934299e new -stop-after option: stop after the given compiler pass (parsing, typing) 2018-08-31 22:49:23 +02:00
sliquister ae1317caae Add option to dump the output of e.g. -dlambda in a file (#1913) 2018-07-27 08:51:53 +01:00
Valentin Gatien-Baron 1ddb7ad725 rename Clflags.fast as Clflags.unsafe
The variable and the flag got out in sync in
2977939b5a.
2018-07-15 15:08:47 -04:00
Armael 7c9c210884 Move Location.absname to Clflags.absname (#1886) 2018-07-06 13:43:28 +01:00
Xavier Clerc 9c182f7e24 Add -dcamlprimc + pass -fdebug-prefix-map when available (#1845)
- Introduce `-dcamlprimc`, to keep the generated C file containing the primitive list
- Use `-fdebug-prefix-map` for compiling temporary C files when this option is supported
2018-06-27 14:56:29 +01:00
Dwight Guth 6a06a1123a add advanced option to tune performance of pattern matching compiler in case of exponential blowup 2018-06-01 23:51:56 +02:00
Sébastien Hinderer fa7019437c Add the -dunique-ids and -dno-unique-ids options to the compilers
These options allow to control whether identifiers are made unique by
appending a stamp to them when dumping intermediate representations or not.

The default is to print the stamp, as is done currently.

The "-dno-unique-ids" option is useful e.g. to simplify the comparison
between a produced intermediate reprsentation (-dlambda, say) and the
expected one, in the context of the testsuite, for instance.
2018-02-20 18:02:35 +01:00
Mark Shinwell b65096678b Register availability analysis (#856) 2017-09-15 11:08:14 +01:00
sliquister 3f76c0525b generalize -dtimings to show allocation, top heap size (#1152) 2017-06-09 12:29:21 +01:00
Gabriel Scherer 2072b5d063 Merge pull request #1187 from Octachron/document_plugins
Manual: minimal documentation for compiler plugins
2017-06-04 10:43:59 -04:00
octachron df3f4b9f61 GPR#1187: document command line flags for plugins 2017-06-01 23:24:12 +02:00
Fabrice Le Fessant 8daa184d95 New -depend option for ocamlc/ocamlopt 2017-06-01 15:56:30 +02:00
Hannes Mehnert 76bf7c568e Respect OCAML_COLOR environment variable for deciding whether to use colors
Since 4.03, OCaml supports coloring its messages to standard output and standard
error, depending on the "-color" argument ({always,never,auto}).  This commit
adds support for the environment variable "OCAML_COLOR" (which value can as well
be {always,never,auto}).

The command line argument "-color" takes precedence, "OCAML_COLOR" is only
taken into consideration if no "-color" is provided.

The motivation for this is that the user should have control over coloring
OCaml's output messages.  OCamlbuild, a widely used build tool executes OCaml
not under a tty (and OCaml does not colorize errors and warnings), which lead
various packages use `color(always)` in their `_tags` files, which breaks with
other (non-interactive) programs (i.e.  editor helpers).

Further discussion was done at https://github.com/ocaml/ocamlbuild/issues/87 and
https://github.com/ocaml/ocaml/pull/1098.
2017-03-15 08:24:13 +00:00
Nicolas Ojeda Bar e75c87dc48 Initial import of linear-scan-register-allocator
The code in this commit was written by Marcell Fischbach & Benedikt Meurer.
See [Mantis#5324](http://caml.inria.fr/mantis/view.php?id=5324) for some
context.

The code (which was originally written against 3.12) was ported to trunk by
doing

```bash
git clone https://github.com/bmeurer/ocaml-experimental/
cd ocaml-experimental
git diff master...linear-scan-register-allocator > t.diff
```

and then applying the diff by hand.
2017-02-22 17:09:18 +01:00
Fabrice Le Fessant 522471d7cb Allow plugins to declare new arguments with Clflags.add_arguments (#796) 2017-01-17 14:34:35 +01:00
Stephen Dolan a35c6117e6 Instrumentation for american fuzzy lop (afl-fuzz) (#504) 2016-12-06 17:18:04 +01:00
Damien Doligez d5a6e50ebe GPR#606: add unboxed types 2016-07-21 13:51:46 +02:00
Sébastien Hinderer 3bbf34319e Add the -no-version option to the toplevel.
This option requests the toplevel not to print its version number
at startup.
2016-05-09 17:22:29 +02:00
alainfrisch 502e4f9336 More warnings when compiling the compiler. 2016-03-15 22:46:35 +01:00
Mark Shinwell 5dced42768 Merge pull request #480 from mshinwell/flambda_unbox-closures
GPR#480: Flambda fix: try to make Unbox_closures behave more reasonably
2016-02-26 16:18:04 +00:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Leo White 4253ed1530 Tidy up new command-line parameters 2016-02-11 16:02:02 +00:00
Mark Shinwell f95fb8bbb0 Bug fixes etc for Flambda 2016-02-09 18:38:16 +01:00
Mark Shinwell a397511031 Import latest Flambda changes 2016-02-09 09:59:26 +01:00
Mark Shinwell 7d1d8814c0 code review 2016-01-14 17:13:43 +00:00
Mark Shinwell fb4d06a3aa Clflags stuff and Arg_helper 2016-01-14 11:27:30 +00:00
Mark Shinwell 96287792b4 Move color_setting into Misc.Color 2016-01-12 14:35:17 +01:00
Pierre Chambart 233e1b1791 Record compiler runtime 2015-12-18 13:33:10 +00:00
Gabriel Scherer cb3bb152ab add option handling for colors in compiler, OCAMLPARAM and ocamlbuild
(Simon Cruanes and Gabriel Scherer)

Use one of
  -color auto
  -color always
  -color never

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:51 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Leo White 5c55e4cc08 Attach documentation comments to Parsetree
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-28 13:11:50 +00:00
Alain Frisch 918f584b64 #6845: -no-check-prims to tell ocamlc not to check primitives in runtime.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16031 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 10:53:47 +00:00
Gabriel Scherer eca0967403 PR#6167: OCAMLPARAM support for disabling PIC generation ('pic=0')
(Gabor Pali)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15793 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-24 16:35:26 +00:00
Damien Doligez a18bc7950b merge changes of version/4.02 from r15121 to r15155
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 17:14:00 +00:00