summaryrefslogtreecommitdiff
path: root/driver
Commit message (Collapse)AuthorAgeFilesLines
* Allow compilation units to shadow sub-modules of Pervasives (#1513)Jérémie Dimino2018-02-021-18/+5
|
* rename the configure-time safe-string options for clarityGabriel Scherer2017-10-021-3/+3
| | | | | | | | | -(un)safe-string becomes -(no-)force-safe-string -(un)safe-string-default becomes -default-unsafe-string Config.safe_string (and Clflags.unsafe_string) keep their name for backward-compatibility, as well as the C define CAML_SAFE_STRING (which corresponds to -force-safe-string).
* safe-string: clarify the relation between configure- and compile-time optionsGabriel Scherer2017-10-022-2/+6
|
* toplevel: remove plugin option in topleveloctachron2017-09-302-4/+0
|
* Allow first character of OCAMLPARAM to specify an alternative separatorFabrice Le Fessant2017-09-291-5/+18
| | | | The alternative separator must be in ":|; ,".
* Register availability analysis (#856)Mark Shinwell2017-09-153-0/+20
|
* Clflags: switch default value of keep_locs from false to true.Daniel Bünzli2017-06-301-2/+2
| | | | This provides better error messages from the toolchain by default.
* generalize -dtimings to show allocation, top heap size (#1152)sliquister2017-06-098-26/+38
|
* Merge pull request #1187 from Octachron/document_pluginsGabriel Scherer2017-06-041-0/+2
|\ | | | | Manual: minimal documentation for compiler plugins
| * GPR#1187: cite typemod and pparse plugin hooksoctachron2017-06-011-0/+2
| |
* | New -depend option for ocamlc/ocamloptFabrice Le Fessant2017-06-014-0/+651
|/
* Install bootstrapped FlexDLL objects to flexdll/David Allsopp2017-04-091-1/+3
| | | | | | | | | | The install-flexdll target now puts the object files for FlexDLL in a subdirectory flexdll of the Standard Library instead of in the Standard Library itself. A configuration tweak means that -I +flexdll is effectively added to all compiler invocations and also a pseudo-option -L+flexdll to ocamlmklib calls to Config.mkdll which fixes PR#7373.
* Respect OCAML_COLOR environment variable for deciding whether to use colorsHannes Mehnert2017-03-155-5/+24
| | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #862 from gasche/PR7037-input_name-in-PparseGabriel Scherer2017-03-081-1/+0
|\ | | | | MPR#7037: fix erroneous Location.input_name setting in Pparse.file
| * PR#7037: fix erroneous Location.input_name setting in Pparse.fileGabriel Scherer2016-10-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading a serialized-ast file, Pparse.file sets Location.input_name to the filename embedded in the AST, and this is correct. But before this patch it would also set Location.input_name to the filename if this is a regular file, and this is wrong: this filename may be a temporary file used for preprocessing (-pp option), with a randomly-generated name, while Location.input_name is in fact already correctly set to the user-provided source path. I needed to fix two lines in ocamldoc/odoc_analyze.ml that used !Location.input_file but actually required access to the post-processing file (ocamldoc re-opens source files and rereads them to detect documentation comments). This is not an invasive change as the path to the post-processing file is available at this point in the code (as the [input_file] variable). This ocamldoc issue was caught thanks to Debian downstream work in bug triaging ( mlpost breaks if it is not fixed, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802347 ) and package maintenance (this bug would not have been found if Debian maintainers had not kept the mlpost documentation generator working even after non-trivial ocamldoc changes).
* | display the output of -dtimings as a hierarchyValentin Gatien-Baron2017-03-075-182/+187
| |
* | Initial import of linear-scan-register-allocatorNicolas Ojeda Bar2017-02-223-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | in -dtimings, include the time spent in -ppx, and the time spent ↵Valentin Gatien-Baron2017-02-011-9/+14
| | | | | | | | demarshalling the output of -pp
* | making -dtimings include time spent typing mli'sValentin Gatien-Baron2017-02-012-36/+40
| |
* | Allow plugins to declare new arguments with Clflags.add_arguments (#796)Fabrice Le Fessant2017-01-172-5/+6
| |
* | PR#7460, GPR#1011: Fix uncaught Arg.Bad exception in compenv.mlBernhard Schommer2017-01-142-13/+30
| | | | | | | | | | | | This was a regression in 4.04.0, where passing files with unknown extension (foo.xwds) to the compiler raises an uncaught Arg.Bad exception.
* | fix whitespace and overlong linesDamien Doligez2016-12-141-1/+1
| |
* | Fix order of arguments with -cclib XXX (#761)Fabrice Le Fessant2016-12-148-152/+146
| |
* | Make "-open" command line flag accept a module path (#960)aalekseyev2016-12-091-1/+1
| | | | | | * Make "-open" command line flag accept a module path
* | Instrumentation for american fuzzy lop (afl-fuzz) (#504)Stephen Dolan2016-12-064-0/+20
| |
* | Improve handling of platforms that do not have gprof profiling support (#933)Sébastien Hinderer2016-11-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies these two behaviours: 1. ``make install'' installs libraries with profiling support only when this makes sense. 2. On platforms that do not support profiling with gprof, the -p option of ocamlopt produces an error message. On such platforms, ``make install'' was installing dummy profiling libraries and ocamlopt's -p option was silently ignored. In addition, this commit modifies the values of the PROFILING make variable. Before the commit it was either prof or noprof. After the commit it is either true or false. In the asmrun directory, the call to ranlib for libasmrunp.a has also been removed from the install target because this command is already invoked in the rule that builds libasmrunp.a. ocamlc/ocamlopt -config now prints the state of profiling support
* | Revert "Improve handling of platforms that do not have gprof profiling ↵Gabriel Scherer2016-11-251-2/+0
| | | | | | | | | | | | | | | | | | support (#933)" This reverts commit 8adfe15f182b9bfced844746bb0e8596dbf41d12. This is a temporary revert caused by Continuous Integration failure. We'll investigate the issue and merge again when it is fixed.
* | Improve handling of platforms that do not have gprof profiling support (#933)Sébastien Hinderer2016-11-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies these two behaviours: 1. ``make install'' installs libraries with profiling support only when this makes sense. 2. On platforms that do not support profiling with gprof, the -p option of ocamlopt produces an error message. On such platforms, ``make install'' was installing dummy profiling libraries and ocamlopt's -p option was silently ignored. In addition, this commit modifies the values of the PROFILING make variable. Before the commit it was either prof or noprof. After the commit it is either true or false. In the asmrun directory, the call to ranlib for libasmrunp.a has also been removed from the install target because this command is already invoked in the rule that builds libasmrunp.a. ocamlc/ocamlopt -config now prints the state of profiling support
* | Added expand to toplevel. (#864)Bernhard Schommer2016-11-072-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added expand to toplevel. The toplevel now also accepts -args and -args0. In order to avoid problems with the overide_args hack now script file is allowed in expand options. * Fixed differences between .ml and .mli * Added missing expand in opttopmain. * Added some test for broken -args for toplevel. The test checks whether the toplevel fails if the script file is passed via args option. * Corrected test case. * Updated error case. Instead of printing the error string, Arg.Bad is raised and a wrapper is added around the parse_and_expand_dynamic_argv. * Added begin ... end around try ... with. * Added working example an strip error path. * Use sed to remove path and fixed typo. * Added documentation. * Also fix typo in reference file. * Added PR to the corresponding change entry. * Reworked Changes entry. * Added new tests and updated documentation. A script file in a responsefile now only prints an error message instead of the help. * Removed duplicated entry. * Simplified expand logic. We only remember where the current last expanded option is. * Use first non_expand position instead. * Updated error message.
* | Terminated instead of seperated.Bernhard Schommer2016-11-041-2/+2
| |
* | Use separated/separator and null character.Bernhard Schommer2016-11-041-3/+3
| |
* | Added simple parse_expand and support ocamldepBernhard Schommer2016-10-123-8/+4
| | | | | | | | | | | | | | | | | | The parse_expand function does the same as parse and parse_dynamic but allows Expand. However it does not update current to avoid the problem that the array is modified. This function is used for the ocamlopt, ocamlc, ocamlcp, ocamloptp and ocamldep.
* | Trim CR, remove inw parameter and updated docu.Bernhard Schommer2016-10-114-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | The read_aux function trims the cr character for the new-line based method and the write functions are simplified without an additional sep function. The argument names are changed to match the default naming format and the documentation is updated to match the implementation behavior. Also two new tests for reading and writing empty command lines as well as a command lines containing empty arguments are added.
* | Added -arg/-args0 to compiler cmd argumentsBernhard Schommer2016-10-104-2/+38
|/ | | | | The -arg/-args0 switch allow it to pass additional command line arguments in files newline/NUL separated.
* Fix "unknown option '-no-keep-docs'" (#765)Cedric Cellier2016-08-181-1/+1
| | | There was a typo in this option name.
* Merge pull request #758 from lefessan/2016-08-11-omakeGabriel Scherer2016-08-112-3/+3
| | | Fix build order of -cclib and direct object files
* fix whitespace, long lines, headersDamien Doligez2016-08-013-3/+6
|
* GPR#606: add unboxed typesDamien Doligez2016-07-215-0/+29
|
* Support -verbose in ocamlnat.alainfrisch2016-07-202-0/+3
|
* "./configure -safe-string" to force safe-string modealainfrisch2016-07-191-2/+11
| | | | | | | | | | | | | | | When configured with -safe-string, the OCaml tools will default to the safe-string mode and ignore -unsafe-string command-line arguments. This is intended to serve two purposes: - Facilitate the detection of packages that are not ready for -safe-string ready. (Perhaps with some OPAM switch?) - Enable some optimizations that assume that all linked units are compiled with -safe-string. Note: currently, there is no check that units compiled with an OCaml configured without -safe-string are not linked in.
* Add plugins in the compilerFabrice Le Fessant2016-07-189-0/+144
|
* Add hooks on some compilation phasesFabrice Le Fessant2016-07-124-9/+23
|
* Misc.split -> String.split_on_char.alainfrisch2016-07-111-1/+1
|
* Merge pull request #591 from mlasson/ocamlparamAlain Frisch2016-07-105-13/+17
|\ | | | | A few modifications to OCAMLPARAM
| * Fix: use OCAMLPARAM include dir even with threadsMarc Lasson2016-07-041-3/+2
| |
| * Use OCAMLPARAM's objects in toplevelMarc Lasson2016-07-041-0/+2
| | | | | | | | Only the non-native one (it does not support OCAMLPARAM at all atm).
| * Do not use OCAMLPARAM objects with -a and -packMarc Lasson2016-05-184-10/+13
| | | | | | | | We add a flag 'with_ocamlparam' to the get_objfiles function.
* | Add Filename.extension and Filename.remove_extension.alainfrisch2016-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The definition was suggested by Daniel Bunzli. It considers that ".", "..", ".foo" all have an empty extension. This commit also fixes chop_extension to align with this definition and adds remove_extension which behaves as chop_extension but does not fail when the extension is empty. There used to be a Misc.chop_extension_if_any in the compiler code base. The commit also replaces it with the new Filename.remove_extension.
* | Also remove linking hack for bytecodePierre Chambart2016-07-081-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the required_globals information to bytecode compilation units. This patch also bootstrap ocamlc. The cmo format is changed by this commit, there is no way around bootstraping here. Note that ocamldep and ocamllex does not rely on the cmo format, so they are not present in this commit. Changes in tests: * Update test/transprim/comparison_table.ml.reference: The (opaque (global List!)) expression is not present anymore * Update tests/no-alias-deps/aliases.cmo.reference The output of objinfo changed
* | Also remove the forced dependency dummy code hack for closurePierre Chambart2016-07-081-4/+4
| | | | | | | | | | This also share the result type of transl_implementation_flambda and transl_store_implementation