Commit Graph

176 Commits (547f9b8126fbb558de184a3424b0fc22a3d57f27)

Author SHA1 Message Date
Damien Doligez 0069123c61
clean up and fix GC message 0x1 (#9949) 2020-10-09 12:02:00 +02:00
hhugo 49aa87c316
Introduce warning 68 to warn about hidden allocation due to pattern match of mutable field in curried functions (#9751)
Introduce new warning 68
2020-08-17 09:47:36 +01:00
Krzysztof Leśniak 761dec8c4a Add missing space 2020-07-07 21:55:36 +02:00
David Allsopp b6c8b35e2d
Make -flarge-toc the default for PowerPC (#9557)
Introduce -fsmall-toc in order to access the previous behaviour and
document both options in the manual and ocamlopt manpage.
2020-05-13 18:23:37 +02:00
muskangarg21 50866e4cbf [nitpick]: Added "." at the end of warning descriptions in utils/warnings.ml 2020-03-30 21:48:02 +05:30
Florian Angeletti 3dd86faa2c
Merge pull request #9357 from muskangarg21/makedepend
[Ocamldep] [TOOLS] : -nocwd argument to not include current dir to search path
2020-03-17 10:18:31 +01:00
muskangarg21 e0b31a6abc TOOLS: Ocamldep arg to not include current dir to search path 2020-03-16 01:00:08 +05:30
Nicolás Ojeda Bär 57d329e07b
Deprecate -annot (#2141)
* Move driver code from Cmt2annot to Read_cmt
* Move cmt2annot.ml into typing/
* make depend
* Use standard error handling
* Move specific logic to read_cmt
* Do not pass full cmt record as argument
* Better locations
* Emit .annot files produced from cmt data
* Remove direct calls to Stypes
* Deprecate -annot
* Changes
* make depend
* Adapt doc
* make -C tools depend
2020-03-13 12:59:34 +01:00
Andre e10d0ac160
Document warning 67 in ocamlc man page (#9346) 2020-03-09 19:38:48 +01:00
Gabriel Scherer 238e483eb8 better documentation for the best-fit allocation policy 2019-12-10 21:40:50 +01:00
Gabriel Scherer 01a34208c3
Merge pull request #9046 from gasche/disable-warning-30-by-default
disable warning 30 (same constructor/label used in two mutually-recursive declarations)
2019-10-18 11:54:05 +02:00
Gabriel Scherer 92a260fdf6 disable warning 30 (same constructor/label used in two mutually-recursive decls)
Warning 30 warns when the same constructor/label is used in two
mutually-recursive type declarations. This warning (added in OCaml
3.12, 2010) was meaningful at the time where constructor/label
conflicts had a shadowing semantics: the "last" definition would mean,
while ideally mutually-recursive definitions should not be strictly
ordered but defined "all at once".

Since OCaml 4.01 (2013) we support type-based disambiguation of
constructor/label names and it is now common to write code such as,
say

    type pattern = Var of var | ...
    type expr = Var of var | ...

(no warning, of course). But warning 30 fires if you instead write

    type pattern = Var of var | ...
    and expr = Var of var | ...

This doesn't make much sense, and in particular it certainly makes no
sense to enable this warning by default. The present PR disables it by
default.
2019-10-16 18:25:54 +02:00
Damien Doligez 01bdd5bbc4
best-fit allocator (#8809) 2019-10-15 13:52:16 +02:00
Daniel Bünzli 17ef076000 .ocamlinit: XDG base directory lookup. (#8834) 2019-09-25 13:50:25 +02:00
David Allsopp 7c2284eda3 Rename references to Pervasives to Stdlib 2019-06-26 18:11:58 +01:00
Lucas Pluvinage 198d650245 without-runtime: cosmetic tweaks 2019-06-11 10:06:56 +02:00
Lucas Pluvinage e61263c0ac Introduce the -without-runtime option. 2019-05-06 14:35:57 +02:00
Xavier Leroy 4b6174d624 Be more explicit about the default value of DESTDIR
This way, "make --warn-undefined-variables install" does not warn.
2019-05-02 19:43:17 +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
Gabriel Scherer 24b240c852 ocamldoc doc: fix the URL of the graphviz project
report by Frédéric Blanqui in MPR#7921.
2019-02-14 16:21:03 +01:00
Louis Roché 52954a428d Add missing word in -nostdlib doc 2018-12-10 11:09:13 +00:00
Alain Frisch 7baf33d6ad
Fix PR6638: add dedicated wrning for "unused open!" (#1110) 2018-11-09 13:41:34 +01:00
Damien Doligez 17b64ac2b2
Add caml_alloc_custom_mem (#1738)
* add caml_alloc_custom_mem and corresponding GC parameters
* fix a bug in tests/misc/ephetest2.ml
2018-11-06 13:42:48 +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
Armaël Guéneau 72f472c860 Add a warning triggered on type declarations "type t = ()"
These are most likely a mistake for "type t = unit", but still valid, and lead
to quite confusing error messages afterwards because now `()` denotes two
different incompatible constructors.
2018-10-05 12:12:26 +02:00
Sébastien Hinderer 01b65ac0af Introduce and use ROOTDIR in more makefiles 2018-09-17 14:51:01 +02:00
Sébastien Hinderer ba6362a07d Move config/Makefile to Makefile.config
In order to prepare the transition to autoconf, this commit moves the
configuration Makefile out of the config directory which will disappear
and gives it the name it will have once intstalled, namely Makefile.config.
2018-09-17 14:23:35 +02:00
Jérémie Dimino ee3730f9b2
Deprecate `ocamlc -vmthread` (#2038) 2018-09-13 10:42:26 +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
Valentin Gatien-Baron 3d0299a185 Create warning 64, for uses of -unsafe with a -pp that returns a marshalled ast
Instead of the current print to stderr. This way it's treated the same
as other warnings: it has a position, colors, can be made an error,
disabled, goes in the expected formatter, is documented.
2018-07-15 15:08:38 -04:00
Valentin Gatien-Baron db86401871 missing warnings in ocamlc's man page 2018-07-15 15:01:14 -04:00
Timothy Bourke de98d901f3 Fix groff macro per @gasche's comments 2018-07-06 11:24:52 +02:00
Timothy Bourke 87c2d09392 Add -open option to ocamldoc man page 2018-07-06 10:58:15 +02:00
David Allsopp b5d1929e87 Whitespace and overlong line fixes. 2018-06-14 15:15:34 +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
Perry E. Metzger 262b70d819 Document that -safe-string is the default, -unsafe-string is not
Nearly identical changes to:
   ocaml.m, ocamlc.m, ocamlopt.m, unified-options.etex

"-safe-string" has been the default since 4.06, so the assertion that
it would be the default someday, and that "-unsafe-string" is still
the default, was incorrect.
2018-06-01 14:05:08 +02:00
Gabriel Scherer 559206b4e0 ocamlc -config: new -config-var option to print specific configuration variables
The proposed behavior of `-config-var s` is as follows:
- if `s` is an existing configuration variable, print its value as
  a string and exit with a success return value (0)
- if `s` is not an existing configuration variable, print nothing
  and exit with a failure return value (non-0)

Note that we do not print a newline after the value of the
configuration variable. In particular, if the value is an empty
string, the output is undistinguishable from the output for
non-existing variables, the return value has to be considered instead.

The following alternative behaviors were considered:

- We could print a newline after the configuration value, which
  would let users distinguish empty values from non-existing variables
  by counting the lines of output, and would also be more pleasant for
  users invoking the option from the command-line. However, the way
  bash works on Windows means that $(ocamlc -config-var foo) would keep
  a trailing \r in its output, and portable scripts would have to use
  $(ocamlc -config-var foo | tr -d '\r') instead, which is a pain.
  (This issue was pointed out by David Allsopp)

- We could print a message on the error output if the configuration
  variable does not exist. This is clearer to a human user, but it is
  annoying for scripts if they forget to silence the error output and
  get their output mixed with our error messages. The main use of this
  new feature is for scripting purposes.
2018-04-27 19:54:08 +02:00
Nicolás Ojeda Bär 6c1bec42c7 Deprecate -thread option, equivalent to -I +threads 2018-03-15 18:37:02 +01:00
Gabriel Scherer d229144189 Merge pull request #1344 from nojb/linscan_flag_manual
Add -linscan doc to manual
2017-10-16 09:27:02 +02:00
octachron 0bf9ceaa3f toplevel: remove plugin option in toplevel 2017-09-30 11:03:53 +02:00
Matej Košík 3c9759b899 Ocamldoc manpage update (#1356)
* add description of the "-charset" option to the manual page of "ocamldoc"
* add description of the "-show-missed-chrossref" option to the manual page of "ocamldoc"
* add description of the "-text" option to the manual page of "ocamldoc"
2017-09-23 18:49:17 +02:00
Leo White 20668002bb Turn off warning 40 by default (#1333)
* Turn off warning 40 by default
2017-09-15 18:41:49 +02:00
Nicolas Ojeda Bar 2c371b7104 Add -linscan doc to manual and man page 2017-09-15 18:07:25 +02:00
Florian Angeletti 588c23117b Merge pull request #1231 from Octachron/hello_κόσμος
Toplevel: only escapes bytes and not strings
2017-09-13 23:24:24 +02:00
octachron 2e6a78aa18 toplevel: only escapes bytes and not strings
Escaping strings when printing them in the toplevel has the disadvantage
of mangling unicode text:

```
\# "한글";;
- : string = "\237\149\156\234\184\128"
```

With this commit, strings are not escaped anymore, contrarily to bytes:

```
\# let cosmos = "κόσμος";;
cosmos : string = "κόσμος"
\# Bytes.of_string cosmos;;
- : bytes =
Bytes.of_string "\206\186\207\140\207\131\206\188\206\191\207\130"
```

This new behavior can be disabled dynamically by setting the environment
variable OCAMLTOP_UTF_8 to false

This change is not solely aesthetic: the mangling of unicode string may
contribute to the impression of some OCaml newcomers that Ocaml has no
support for unicode.
2017-09-12 22:28:18 +02:00
Thomas Refis 1747a2f0eb Mention deprecated warning 25 in manual and man page
* warning 25: updated the man page

* warning 25: update the manual
2017-07-10 18:18:37 +02:00
Etienne Millon e795b95eb7 Fix "-keep-docs" option in ocamlopt manpage
It was a duplicate of `-keep-locs` below.
2017-06-30 15:56:18 +02:00