-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[coq] Add support for native-mode compilation.
We add a `(mode ...)` field to the `(coq.theory ...)` stanza that when set to `native` will have the Coq compiler to generate and install "native" objects, that is to say, `.cmxs` libraries containing an ML-level version of the corresponding Coq module. As of today, Coq itself does call the `ocamlfind ocaml` to compile the object files, this restriction may be lifted in the future however it is not easy as tactics do have access to "Just-In-Time" native compilation too. The patch itself is straightforward, except for a hack to handle native compilation targets. By default, `coqc -native-compute on` will generate the OCaml-level objects files under `.coq-native/`, and the regular `.vo` object in the build dir. This scheme doesn't work well with the restriction than a rule can only produce targets in the same directory. We workaround that by passing a special flag to Coq so `.coq-native` is dropped from the output path; at install time we do set the rules up so indeed the objects will be installed under `.coq-native` for compatibility. TODO: - update doc - disable on dev profile Signed-off-by: Emilio Jesus Gallego Arias <[email protected]>
- Loading branch information
Showing
8 changed files
with
105 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters