Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is built upon the development of #345 to support building (most of) Compcert with the Dune build system.
It resolves the issues mentioned in the original draft, especially building for all architectures, while keeping all the mentioned advantages of dune.
Each architecture is built in the respective _build/ directory (dune calls these context), by overwriting the
TARGET_PLATFORM
environment variable. This variable controls which platform code is then used to compile and extract the Coq/ML sources.The "default" context relies on a set
TARGET_PLATFORM
enviroment variable. A specific context can be built by runningdune build _build/<context>
. If no context is specified (i.e.dune build
), all platforms are build at once.The project is split up into 4 packages:
compcert
(The compiler package producing the binary),MenhirLib
,Flocq
anddocumentation
(generates documentation using coq2html). All of them are build by default. By not specifyingMenhirLib
orFlocq
, dune will try to find them in the coq library search path. To build only specified packages, run dune with the-p
flag, e.g.dune build _build/arm -p compcert
.To allow windows-native builds, the
configure
script is running a translated OCaml version of the original script (with some limited features missing, which I would be open to implement as well - seeTODO
s intools/configure.ml
).It also generates the
_CoqProject
file, which references to the "default" build context files (After building all contexts, just switching this reference allows for quick platform changes without full recompilation in development).The runtime is still compiled using the Makefile.
At the moment the original Makefile build system is partially broken (due to some moved files & changed imports), which I would be open to fix if wanted.
I would be happy to hear some thoughts.