diff options
| author | coqbot-app[bot] | 2021-02-10 15:05:49 +0000 |
|---|---|---|
| committer | GitHub | 2021-02-10 15:05:49 +0000 |
| commit | 7ac95ead2c2c7f905ffbdd395e9ffb1fbf76c4d3 (patch) | |
| tree | 64363f06cb9e54582198ffb5aa4363d111056988 /sysinit/coqinit.ml | |
| parent | 132b2e240e1869be5ca0cc7200aa4ab6a94f2275 (diff) | |
| parent | 74aabc032014b0b83f2d54996dbb76cb5a78ea4d (diff) | |
Merge PR #13821: Properly handle ordering of -w and -native-compiler
Reviewed-by: gares
Diffstat (limited to 'sysinit/coqinit.ml')
| -rw-r--r-- | sysinit/coqinit.ml | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sysinit/coqinit.ml b/sysinit/coqinit.ml index 16c8389de5..25da2c5302 100644 --- a/sysinit/coqinit.ml +++ b/sysinit/coqinit.ml @@ -126,10 +126,16 @@ let require_file (dir, from, exp) = let mfrom = Option.map Libnames.qualid_of_string from in Flags.silently (Vernacentries.vernac_require mfrom exp) [mp] -let handle_injection = function - | Coqargs.RequireInjection r -> require_file r - (* | LoadInjection l -> *) - | Coqargs.OptionInjection o -> Coqargs.set_option o +let warn_no_native_compiler = + CWarnings.create ~name:"native-compiler-disabled" ~category:"native-compiler" + Pp.(fun s -> strbrk "Native compiler is disabled," ++ + strbrk " -native-compiler " ++ strbrk s ++ + strbrk " option ignored.") + +let handle_injection = let open Coqargs in function + | RequireInjection r -> require_file r + | OptionInjection o -> set_option o + | WarnNoNative s -> warn_no_native_compiler s let start_library ~top injections = Flags.verbosely Declaremods.start_library top; |
