| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
-(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).
|
| |
|
| |
|
|
|
|
| |
The alternative separator must be in ":|; ,".
|
| |
|
|
|
|
| |
This provides better error messages from the toolchain by default.
|
| |
|
|\
| |
| | |
Manual: minimal documentation for compiler plugins
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
MPR#7037: fix erroneous Location.input_name setting in Pparse.file
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
demarshalling the output of -pp
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| | |
* Make "-open" command line flag accept a module path
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
The -arg/-args0 switch allow it to pass additional command line
arguments in files newline/NUL separated.
|
|
|
| |
There was a typo in this option name.
|
|
|
| |
Fix build order of -cclib and direct object files
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|\
| |
| | |
A few modifications to OCAMLPARAM
|
| | |
|
| |
| |
| |
| | |
Only the non-native one (it does not support OCAMLPARAM at all atm).
|
| |
| |
| |
| | |
We add a flag 'with_ocamlparam' to the get_objfiles function.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
This also share the result type of transl_implementation_flambda
and transl_store_implementation
|