summaryrefslogtreecommitdiff
path: root/compilerlibs/Makefile.compilerlibs
Commit message (Collapse)AuthorAgeFilesLines
* Less verbose logs from `make` (#11844)Xavier Leroy2023-01-181-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Print concise summaries instead of full commands for some of the most verbose commands. For example, print ``` OCAMLC lambda/switch.cmo ``` instead of ``` ./boot/ocamlrun ./boot/ocamlc -nostdlib -I ./boot -use-prims runtime/primitives -g -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48 -warn-error +a -bin-annot -strict-formats -I lambda -I utils -I parsing -I typing -I bytecomp -I file_formats -I lambda -I middle_end -I middle_end/closure -I middle_end/flambda -I middle_end/flambda/base_types -I asmcomp -I driver -I toplevel -I tools -c lambda/switch.ml ``` and ``` CC runtime/addrmap.b.o ``` instead of ``` gcc -c -O2 -fno-strict-aliasing -fwrapv -pthread -g -Wall -Werror -fno-common -fexcess-precision=standard -fno-tree-vrp -ffunction-sections -I./runtime -D_FILE_OFFSET_BITS=64 -DCAMLDLLIMPORT= -DIN_CAML_RUNTIME -o runtime/addrmap.b.o runtime/addrmap.c ``` The output is generated with the Make function `$(info ...)` to avoid shelling out to `echo` each time, which can be expensive under Cygwin. A variable `V` controls whether to use the new style. When `V=0` (the default), it is used. If `V=1`, then the usual full output is used instead. Co-authored-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
* Specify which compiler to use to build bytecode compilerlibsSébastien Hinderer2022-12-131-0/+9
|
* Embed printer types in toplevels and debuggerSébastien Hinderer2022-11-241-0/+4
| | | | | | | | | | | | | | | | | | | The debugger and toplevels let users install printers for their data types. To make sure the provided printers have the right type, both the debugger and the toplevel need to know the internal OCaml representation of the expected types. So far, both the debugger and the toplevels used to extract the expected representatioons from topdirs.cmi which they were reading at runtime. This creates problems (e.g. when the compiler has not yet been installed) and yields not so easy to read code. In this commit, the type of the printers are defined in strings as they would be written in OCaml in topdirs.ml. These strings are parsed at runtime and the corresponding typing declarations are added to the environment.
* Turn asmcomp/branch_relaxation_intf.ml into an MLI-only moduleSébastien Hinderer2022-06-301-1/+0
|
* Add a hook for misses in Load_pathDavid Allsopp2022-05-241-2/+2
| | | | | | Load_path.find{,_uncap} now invoke a hook before raising Not_found, which provides a mechanism for automatically adding directories to the Load_path if required.
* Use fixed configuration for boot/ocamlcDavid Allsopp2022-05-051-1/+7
| | | | | | Use the same configuration for boot/ocamlc regardless of the machine on which the bootstrap is performed. Now set Config.in_boot_compiler to true for boot/ocamlc.
* Shapes: Add Shape module with terms definitions and utility functionsUlysse Gérard2021-11-091-0/+1
| | | | | | | | /!\ Need bootstrap + Move Uid and Sig_component_kind to Shape Co-authored-by: Thomas Refis <thomas.refis@gmail.com>
* preliminary implementation of TMC (tail modulo cons)Gabriel Scherer2021-11-021-0/+1
|
* Introduce native-toplevel specific hooks moduleDavid Allsopp2021-10-141-0/+2
| | | | | | This commit simply moves code from Topeval (whose interface is shared with the bytecode interpreter) to a new module Tophooks which is specific to the native toplevel.
* Safepoints (#10039)Sadiq Jaffer2021-07-091-1/+2
| | | | | | | This PR introduces polling instructions (Ipoll Mach instructions) to guarantee that the mutator can always be interrupted (by signals or other asynchronous actions) in a finite amount of time. Co-authored-by: Damien Doligez <damien.doligez@gmail.com> Co-authored-by: Xavier Leroy <xavierleroy@users.noreply.github.com> Co-authored-by: Mark Shinwell <mshinwell@gmail.com>
* swaps and movesFlorian Angeletti2021-06-221-1/+2
|
* Add a generic backward dataflow analyzer and use it for liveness analysis ↵Xavier Leroy2021-05-151-0/+1
| | | | | | | | | | | | | | | (#10404) The analyzer is parameterized by an abstract domain and a transfer function. For recursive handlers, it remembers the latest inferred abstract state and uses it to start the next fixpoint iteration. This avoids behaviors exponential in the nesting of recursive handlers, like we would have if we started every iteration with bottom. This exponential behavior was present in the old implementation of liveness analysis. It is gone in the new implementation that just calls into the generic analyzer.
* Merge pull request #10401 from Octachron/signature_group_2Gabriel Scherer2021-05-121-0/+1
|\ | | | | #6654, #9974: make include and with constraints aware of ghost components
| * Signature_group: ghost-aware iteration over signaturesoctachron2021-05-061-0/+1
| | | | | | | | | | | | Signatures contain ghost type items that depends on a core syntactic item, the module "Signature_group" provides iterators that are aware of this difference between syntactic and ghost items.
* | Maintain more structural information in type-checking errorsAntal Spector-Zabusky2021-05-061-0/+1
|/ | | | | | | | | | | | | | | | | | | | This commit refactors the types that make up type-checking errors to maintain more structural information. Most significantly, we split out the errors we get from unification, moregen, and type equality in `Ctype` into three distinct exceptions, and retain the sorts of information we keep during unification in the other two cases as well (no more `Unify []`). We also maintain more information in `Includecore` about mismatches of primitives, manifests, and private objects and variants This commit doesn't make a lot of changes to the user-visible error messages yet, only what's necessary to support the type changes, but it enables a forthcoming patch where we use this improvement to produce more informative error messages. This commit includes existing work by Mekhrubon Tuarev, who did all the early development. I (Antal Spector-Zabusky) came and built the layer of types on top.
* Refactor Makefile.compilerlibsDavid Allsopp2021-04-301-97/+198
|
* Convert erroneous tabs to whitespaceDavid Allsopp2021-04-301-8/+8
|
* Merge pull request #1400 from lthls/cmm_invariantsGabriel Scherer2021-04-291-0/+1
|\ | | | | Cmm invariants
| * Add an optional check for invariants on the Cmm representationVincent Laviron2021-04-191-0/+1
| |
* | Remove the availability analysis (#10355)Xavier Leroy2021-04-231-6/+1
|/ | | | | | | | | | The availability analysis was introduced in 2017 as part of GPR #856, as a first step towards generating DWARF debugging information. This project (generating DWARF debug info) was stopped, but the analysis is still here, even though its results are not used and it is not normally run (except when the experimental -drunavail flag is given). This is essentially dead code. This PR removes it.
* Remove slightly gratitutous make macro usesDavid Allsopp2021-04-181-5/+5
|
* Correct rules in Makefile.compilerlibsDavid Allsopp2021-04-181-8/+8
|
* Semantic diffings for functor types and applications (#9331)Gabriel Radanne2021-04-071-2/+4
| | | | | | | | | | | | | | | This commit improves the error messages for ill-typed functor applications and inclusion between functor types. It does so by computing a diff between the expected and the provided types, and find an application that minimizes the error. The set of changes also paves the way for better diff for inclusion checks between signatures. * Implement a generic and variadic Wagner–Fischer algorithm for computing locally optimal paths. * Compute a full error tree for module type inclusion and equality errors * Improve the error message for module type equality * Expand the error message at the module level by using a diffing algorithm to analyze erroneous functor multi-applications or inclusions using Levenshtein distance. Co-authored-by: Florian Angeletti <florian.angeletti@inria.fr> Co-authored-by: octachron <octa@polychoron.fr>
* Revert "make clean should also remove toplevel/byte/top{dirs,loop}.mli"octachron2021-02-011-1/+0
| | | | This reverts commit 48d3301cbeb8c79c57c86b442e14f03322ab8f4e.
* Merge pull request #10183 from Octachron/fix_ciFlorian Angeletti2021-02-011-4/+6
|\ | | | | Fix CI
| * toplevel makefile: remove accidental copyoctachron2021-02-011-4/+6
| |
* | make clean should also remove toplevel/byte/top{dirs,loop}.mliSébastien Hinderer2021-02-011-0/+1
|/
* Factorise bytecode and native toplevels (#10124)Louis Gesbert2021-01-261-9/+13
| | | | Introduce modules Topeval and Topcommon to share common code between the bytecode and native toplevel.
* Rename and extract EnvLazy to its own file (#10052)Thomas Refis2021-01-201-1/+1
|
* Rename ocamlopttoplevel.cmxa to ocamltoplevel.cmxa (#10078)Louis Gesbert2020-12-151-3/+3
| | | | | | This follows from #10061 by renaming the library to further unify the two toplevels. Some remaining references to `Opttop*` have also been cleaned up.
* Unify topXXX.mli / opttopXXX.mli (#10061)Louis Gesbert2020-12-081-8/+27
| | | | | | | | | | | | This unifies both implementations of the toplevel under a common interface. Similar Makefile hacks to those in place for dynlink are used: byte and native implementations are in separate directories, while the shared interface are in the parent and copied as needed by the build rules. This is a preliminary step to remove duplication as much as possible in the two implementations, but should already be pretty useful for libraries that use the `Toploop` interface.
* Centralized tracking of frontend's global state (#9963)Thomas Refis2020-10-151-1/+2
| | | | import Local_store from merlin, with a simplified API following review comments
* Merge pull request #9948 from nojb/remove_spacetimeXavier Leroy2020-10-091-1/+1
|\ | | | | The Spacetime memory profiler is not going to be supported in Multicore OCaml, and is already broken by some of the related changes in OCaml 4.12. The core development team decided to remove Spacetime support from OCaml 4.12.
| * Remove SpacetimeNicolás Ojeda Bär2020-10-081-1/+1
| |
* | Save Linear IR before emit (#8939)Greta Yorsh2020-10-071-0/+1
|/ | | | | | | | | | | * Save IR before emit * Update .depend for linear_format * Test for -save-ir-after command-line option * Address review comments * Add Changes entry
* Fix ocamlcommon.cmxa/ocamlopttoplevel.cmxa rulesDavid Allsopp2020-09-121-2/+2
| | | | | Depending on ocamlopt meant they were always rebuilt on Windows/Cygwin builds.
* Merge pull request #9551 from nojb/microbfdXavier Leroy2020-07-141-1/+1
|\ | | | | Implement (in utils/binutils.ml) a simple parser for ELF, Mach-O and PE shared object files. Use it to get rid of libbfd in ocamlobjinfo and to improve the checking of external primitives during linking in ocamlc.
| * Add module utils/binutilsNicolás Ojeda Bär2020-07-021-1/+1
| |
* | Move code of main and optmain to compilerlibsStephen Dolan2020-06-301-2/+2
|/
* patterns: move Parmatch.Pattern_head into Patterns.HeadGabriel Scherer2020-05-141-1/+1
| | | | | | | | The aim is to also move the Simple/Half_simple/General stuff from matching, but we need to split in those modules the part that are purely structural (they go in Patterns) and the parts that are actually compilation logic (Half_simple.of_clause), those stay in Matching.
* [minor] Makefile: move ARCH_SPECIFIC back to the main MakefileGabriel Scherer2020-05-061-4/+0
| | | | | | | | | (This is a small, independent readability fix.) ARCH_SPECIFIC was moved into Makefile.compilerlibs by mistake; it is not used in Makefile.compilerlibs (in particular the ARCH_SPECIFIC_ASMCOMP_* variables do not depend on it), and it is used in the main Makefile.
* Tweak Makefile variable (#9488)Nicolás Ojeda Bär2020-04-231-1/+1
|
* Ensure make distclean works on an unconfigured treeDavid Allsopp2019-10-151-5/+9
|
* Deprecate -annot (#2141)Nicolás Ojeda Bär2020-03-131-3/+3
| | | | | | | | | | | | | | | | * 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
* typedecl_separability: interfaces and basic definitions, implementations missingRodolphe Lepigre2020-01-281-0/+1
|
* fix a typo in #9211Gabriel Scherer2020-01-081-1/+1
| | | | (The typo was caught by make's undefined-variables warning on the INRIA CI)
* compilerlibs archives: add dependencies on .mli-only compilation unitsGabriel Scherer2019-12-261-20/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the Makefile for compilerlibs archives only tracks their dependencies on implementation object files (.cmo, .cmx). .mli-only files in those directories result in a .cmi without a .cmo. The main makefile uses dependencies on compilerlibs archives as a proxy for all dependencies on the corresponding compiler modules. This assumption was broken by .mli-only modules not being dependencies on the archives. For example, rebuilding compilerlibs archives would not refresh file_format/cmxs_format.cmi. The following steps would lead to a build failure: make core make ocamltools <add a new blank line at the beginning of utils/misc.mli> make ocamltools File "/home/gasche/Prog/ocaml/github-trunk/tools/objinfo.ml", line 1: Error: The files /home/gasche/Prog/ocaml/github-trunk/utils/misc.cmi and /home/gasche/Prog/ocaml/github-trunk/file_formats/cmxs_format.cmi make inconsistent assumptions over interface Misc
* Makefile: move the targets for compilerlibs archives to an included MakefieGabriel Scherer2019-12-261-0/+288