Commit Graph

511 Commits (bdd9ca391e3a56253d7480b07bb1a8aac361904c)

Author SHA1 Message Date
Gabriel Scherer 63eb3dad0d Arg: a new Rest_all spec, similar to Rest, that passes all arguments at once
In particular this allow to detect a Rest_all keyword followed by no
arguments at all (an empty list).
2020-06-05 22:06:21 +02:00
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
Thomas Refis 86b33bc450 Uid.reinit 2020-03-05 14:20:04 +01:00
Gabriel Scherer 8a79f6ce59
Merge pull request #9021 from Octachron/longident_parser
Expose parsers for Longident.t
2020-01-10 11:23:09 +01:00
Florian Angeletti 40e40a9c20 compilerlibs: expose parsers for 'Longident.t's 2020-01-09 16:45:39 +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 4353c7581e Add Compenv.stop_early flag 2019-11-04 11:36:41 +00:00
Greta Yorsh a992599c6c Rename stop_after_pass_names to available_pass_names 2019-11-04 10:53:10 +00:00
Greta Yorsh db674344b1 Use stop_early instead of compile_only 2019-11-04 10:48:31 +00:00
Greta Yorsh 7c11fcbdd1 Stop before emit 2019-10-30 15:27:29 +00:00
Greta Yorsh ddcea81aa3 Fix check for incompatible -c and -o options 2019-10-15 13:12:52 +01:00
Thomas Refis 79f1c73462
Warn about unused functor parameters (#8891) 2019-10-14 11:11:01 +01:00
Florian Angeletti 611e9ad1a5 add -dinterval to ocamlnat 2019-09-30 15:56:40 +02:00
Florian Angeletti edd4ed5708 add support for no_float_const_prop to ocamlnat 2019-09-30 15:56:40 +02:00
Florian Angeletti fa2409b7f2 Add -linscan to ocamlnat
in order to reduce the difference between the native compiler and
toplevel.
2019-09-30 15:56:40 +02:00
Florian Angeletti a509157eb9 share argument implementation across executable
This commit defines five default argument modules in
Main_args.default. Those modules provide a default implementation
for the argument of ocaml, ocamlnat, ocamlc, ocamlopt, ocamldoc,
ocamlcp, ocamloptp, and expect_test.

Grouping together those implementations allow to share as much as
possible similar implementation across executables. It should make
easier to keep synchronized the various implementation, or reuse
those implementation in alternative drivers.
2019-09-30 15:56:40 +02:00
Florian Angeletti f6a72e3578 Cleanup ocamldoc pre-arguments
This commit removes all pre-arguments that were defined in
Odoc_args but never turned into actual arguments.
2019-09-30 15:56:40 +02:00
Florian Angeletti 91c762a427 Merge dump_live and print_live 2019-09-30 15:56:40 +02: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 4d09a8dbc4 Add function-sections to OCAMLPARAM 2019-07-15 10:25:26 +01:00
Greta Yorsh 351edb49bb Add compile-time option -function-sections 2019-07-15 10:25:26 +01:00
Sébastien Hinderer ce3bbea53c Remove unused file driver/ocamlcomp.sh.in
No file seems to reference it. In particular, it is never turned into
a genuine shell script.
2019-07-10 14:25:01 +01:00
zapashcanon 6375461686 Improve shell scripts (#1690) 2019-06-19 16:15:02 +02:00
Gabriel Scherer 010d94cae2
Merge pull request #2309 from TheLortex/runtime-variant-path
Add -noruntime option
2019-06-19 16:12:28 +02:00
Lucas Pluvinage 198d650245 without-runtime: cosmetic tweaks 2019-06-11 10:06:56 +02:00
JPR 6dc59549ce Fixing misspellings 2019-05-21 10:23:27 +02: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
Lucas Pluvinage e61263c0ac Introduce the -without-runtime option. 2019-05-06 14:35:57 +02:00
Jeremie Dimino 1f026fd748 Fix #8635 2019-04-23 12:20:37 +01:00
Nicolás Ojeda Bär aebc58a1d5 Fix check-typo errors 2019-04-10 10:44:11 +02:00
Nicolás Ojeda Bär 4418910ff9 ocamldep: .ml in earlier include dirs should shadow .mli in later include dirs 2019-04-09 20:48:58 +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
Stephen Dolan 838e44a245
Update issue numbers in comments after Mantis -> Github migration. (#8505) 2019-03-18 09:42:23 +00: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
Thomas Refis 3755f8f576 main_args: remove some redundancy in Ocamldoc_options. 2019-03-15 10:57:06 +00: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
David Allsopp 6e84987715 Restore -vmthreads flag as an error (#2312)
This GPR restores -vmthread with an adapted version of the deprecation message as an error message and also keeps the use_vmthreads part of ppx contexts.

* Partially revert #2289
* Convert -vmthread to an error
* Neuter use_vmthreads in ppx context
* Remove Clflags.use_vmthreads
2019-03-13 10:46:30 +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 43793390b9 MPR#7918: fix 4.08+dev regression, object files would remain after build error 2019-02-26 08:16:07 +01:00
Florian Angeletti f15ee3be5d
Merge pull request #1941 from sliquister/ocamlcp-dedup3
reduce boilerplate in compiler command line parsing
2019-02-04 17:03:27 +01: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
Valentin Gatien-Baron 427e5a5c59 simplify the ocamlc{,opt}p code forwarding options to ocaml{c,opt} 2019-01-22 20:38:15 -05:00
Gabriel Scherer 95bdcd3856 Compile_common: turn `init` into continuation-passing `with_info`
I think this clarifies the fact that the `info` value is a resource that
has a limited lifetime. The new API lets us create (and close) the ppf_dump
directly from `Compile_common.with_info`, simplifying the API for user.
2019-01-05 12:12:20 +01:00
Gabriel Scherer c6d95c9ef6 Compile_common.init: make ppf_dump a labelled argument 2019-01-04 18:51:14 +01:00
Gabriel Scherer a75fc10076 driver/compile_common: refactor interface/implementation entry points 2019-01-04 18:09:44 +01:00
Gabriel Scherer c1e37d0446 driver/compile_common: store 'native' as part of the 'info' structure 2019-01-04 18:09:44 +01:00
Gabriel Scherer 35829b6b2a driver/compile_common: whitespace refactoring 2019-01-04 18:09:41 +01:00