Commit Graph

525 Commits (8b7ff3532cd4de3232c044a9db9dd44bfd0f947e)

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
Nicolás Ojeda Bär 5381e13626
Fix handling of Exit_compiler exception in toplevel (#9798) 2020-10-05 09:46:20 +02:00
Daniel Bünzli ad12d494a8
Unopen Compenv in the code base (this is a nop). (#9933) 2020-09-23 22:55:21 +02:00
Josh Berdine 169892a0d0 Use polymorphic compare to empty string instead of checking length for 0 2020-09-01 21:59:05 +01:00
Josh Berdine a69be67e33 Treat set-but-empty OCAMLPARAM the same as unset
In case the OCAMLPARAM environment variable is set to the empty
string, the current behavior is to attempt to parse it, which fails to
find the `_` character separating the "before" and "after"
settings. This patch changes this to treat OCAMLPARAM set to the empty
string the same as being unset, which is to do nothing.
2020-08-21 20:42:15 +01:00
Daniel Bünzli 80326033cb
ocamldep: do not process files during cli parsing. (#9795)
It leads to broken cli behaviour. Closes #9299.
2020-07-23 21:00:26 +02:00
Nicolás Ojeda Bär 9ac31c224c Rename No_unsafe_array_syntax_without_parsing => Unsafe_array_syntax_without_parsing 2020-07-20 08:31:18 +02:00
Nicolás Ojeda Bär f9786a9cb2 Rename Unsafe_without_parsing => No_unsafe_array_syntax_without_parsing 2020-07-20 08:31:18 +02:00
Stephen Dolan 088fa01b3e
Merge pull request #9688 from stedolan/main-compiler-libs
Expose the main entrypoint in compilerlibs
2020-07-06 13:03:02 +01:00
Stephen Dolan c2461c000c Start Clflags.parse_arguments from 0 2020-06-30 10:57:09 +01:00
Stephen Dolan 81618f7b61 Move code of main and optmain to compilerlibs 2020-06-30 10:57:09 +01:00
Stephen Dolan d5af1ffb4f Move calls to exit to main/optmain 2020-06-30 10:57:09 +01:00
Leo White bc8c0d2538 Make the `mark` parameters in `Includemod` non-optional 2020-06-25 11:35:00 +01:00
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