| 1 |
Description: fix compilation with dune 3.24 |
| 2 |
Author: upstream |
| 3 |
Forwarded: yes |
| 4 |
|
| 5 |
--- coq.orig/boot/dune |
| 6 |
+++ coq/boot/dune |
| 7 |
@@ -7,7 +7,3 @@ |
| 8 |
; until ocaml/dune#4892 fixed |
| 9 |
; (private_modules util) |
| 10 |
(libraries rocq-runtime.config rocq-runtime.clib)) |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
--- coq.orig/boot/env.ml |
| 16 |
+++ coq/boot/env.ml |
| 17 |
@@ -64,9 +64,36 @@ |
| 18 |
| Some p -> p |
| 19 |
| None -> canonical_path_name (Filename.dirname Sys.executable_name) |
| 20 |
|
| 21 |
+(** Locate the dune workspace root containing the given path, if any. *) |
| 22 |
+let dune_workspace_root : string -> string option = fun path -> |
| 23 |
+ let rec workspace_root path = |
| 24 |
+ let parent = Filename.dirname path in |
| 25 |
+ if parent = path then |
| 26 |
+ None |
| 27 |
+ else if Filename.basename path = "_build" then |
| 28 |
+ Some parent |
| 29 |
+ else |
| 30 |
+ workspace_root parent |
| 31 |
+ in |
| 32 |
+ match workspace_root path with |
| 33 |
+ | None -> None |
| 34 |
+ | Some root -> |
| 35 |
+ (* Check that this indeed looks like a dune workspace. *) |
| 36 |
+ let ok = |
| 37 |
+ let has file = Sys.file_exists (Filename.concat root file) in |
| 38 |
+ List.exists has ["dune-project"; "dune-workspace"] |
| 39 |
+ in |
| 40 |
+ if ok then Some root else None |
| 41 |
+ |
| 42 |
(** The following only makes sense when executables are running from |
| 43 |
source tree (e.g. during build or in local mode). *) |
| 44 |
let rocqroot = |
| 45 |
+ match dune_workspace_root rocqbin with |
| 46 |
+ | Some dir -> |
| 47 |
+ let dir = Filename.concat dir "_build" in |
| 48 |
+ let dir = Filename.concat dir "install" in |
| 49 |
+ Filename.concat dir "default" |
| 50 |
+ | None -> |
| 51 |
let rec search = function |
| 52 |
| [] -> |
| 53 |
(* couldn't recognize the layout, guess the executable is 1 dir below the root |
| 54 |
--- coq.orig/checker/dune |
| 55 |
+++ coq/checker/dune |
| 56 |
@@ -10,10 +10,6 @@ |
| 57 |
(wrapped true) |
| 58 |
(libraries rocq-runtime.boot rocq-runtime.kernel)) |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
(executable |
| 65 |
(name rocqchk) |
| 66 |
(public_name rocqchk) |
| 67 |
--- coq.orig/clib/dune |
| 68 |
+++ coq/clib/dune |
| 69 |
@@ -11,10 +11,6 @@ |
| 70 |
(memprof-limits -> memprof_coq.memprof.ml)) |
| 71 |
str unix threads)) |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
(executable |
| 78 |
(name unicodetable_gen) |
| 79 |
(modules unicodetable_gen)) |
| 80 |
--- coq.orig/config/dune |
| 81 |
+++ coq/config/dune |
| 82 |
@@ -5,10 +5,6 @@ |
| 83 |
(modules coq_config) |
| 84 |
(wrapped false)) |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
(library |
| 91 |
(name byte_config) |
| 92 |
(synopsis "Rocq Configuration Variables (for bytecode only)") |
| 93 |
@@ -18,10 +14,6 @@ |
| 94 |
(libraries compiler-libs.toplevel) |
| 95 |
(modes byte)) |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
(executable (name list_plugins) (modules list_plugins)) |
| 102 |
(rule (targets plugin_list) |
| 103 |
(deps (source_tree %{project_root}/plugins)) |
| 104 |
--- coq.orig/dev/dune |
| 105 |
+++ coq/dev/dune |
| 106 |
@@ -58,11 +58,4 @@ |
| 107 |
(install |
| 108 |
(section lib) |
| 109 |
(package rocq-runtime) |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
+ (files (glob_files (ml_toplevel/** with_prefix dev/ml_toplevel)))) |
| 119 |
--- coq.orig/dune |
| 120 |
+++ coq/dune |
| 121 |
@@ -1,7 +1,8 @@ |
| 122 |
; Default flags for all Rocq libraries. |
| 123 |
(env |
| 124 |
|
| 125 |
|
| 126 |
+ ; cf explanation for warning settings in configure.ml |
| 127 |
+ (dev (flags :standard -w +a-4-9-27-40..42-44-45-48-58-67-68-70 -warn-error +a \ -short-paths) |
| 128 |
+ (rocq (flags :standard -w +default))) |
| 129 |
(release (flags :standard) |
| 130 |
(ocamlopt_flags :standard -O3 -unbox-closures)) |
| 131 |
(ireport (flags :standard -w -9-27+60-70) |
| 132 |
--- coq.orig/dune-project |
| 133 |
+++ coq/dune-project |
| 134 |
@@ -1,11 +1,11 @@ |
| 135 |
|
| 136 |
+(lang dune 3.21) |
| 137 |
(name rocq-prover) |
| 138 |
|
| 139 |
; We use directory targets in documentation |
| 140 |
(using directory-targets 0.1) |
| 141 |
|
| 142 |
; We need this for when we use the dune.disabled files instead of our rule_gen |
| 143 |
|
| 144 |
+(using rocq 0.11) |
| 145 |
|
| 146 |
(formatting |
| 147 |
(enabled_for ocaml)) |
| 148 |
@@ -20,6 +20,7 @@ |
| 149 |
(homepage https://rocq-prover.org/) |
| 150 |
(documentation "https://rocq-prover.org/docs/") |
| 151 |
(version dev) |
| 152 |
+(maintenance_intent "(any)") |
| 153 |
|
| 154 |
; Note that we use rocq-runtime.opam.template to have dune add the correct opam |
| 155 |
; prefix for configure |
| 156 |
@@ -33,7 +34,7 @@ |
| 157 |
(conflicts |
| 158 |
(coq (< 8.17)) |
| 159 |
(coq-core (< 8.21))) |
| 160 |
|
| 161 |
+ (depopts rocq-native (memprof-limits (>= 0.3.0)) memtrace) |
| 162 |
(synopsis "The Rocq Prover -- Core Binaries and Tools") |
| 163 |
(description "The Rocq Prover is an interactive theorem prover, or proof assistant. It provides |
| 164 |
a formal language to write mathematical definitions, executable |
| 165 |
@@ -148,6 +149,7 @@ |
| 166 |
|
| 167 |
(package |
| 168 |
(name rocq-test-suite) |
| 169 |
+ (allow_empty) |
| 170 |
(depends |
| 171 |
(rocq-core (= :version)) |
| 172 |
coqide-server |
| 173 |
--- coq.orig/engine/dune |
| 174 |
+++ coq/engine/dune |
| 175 |
@@ -6,7 +6,3 @@ |
| 176 |
; until ocaml/dune#4892 fixed |
| 177 |
; (private_modules univSubst) |
| 178 |
(libraries library)) |
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
--- coq.orig/gramlib/dune |
| 184 |
+++ coq/gramlib/dune |
| 185 |
@@ -3,7 +3,3 @@ |
| 186 |
(public_name rocq-runtime.gramlib) |
| 187 |
(modules_without_implementation plexing) |
| 188 |
(libraries rocq-runtime.lib)) |
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
--- coq.orig/interp/dune |
| 194 |
+++ coq/interp/dune |
| 195 |
@@ -5,7 +5,3 @@ |
| 196 |
(wrapped false) |
| 197 |
(modules_without_implementation constrexpr notation_term) |
| 198 |
(libraries zarith pretyping gramlib)) |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
--- coq.orig/kernel/byterun/dune |
| 204 |
+++ coq/kernel/byterun/dune |
| 205 |
@@ -7,10 +7,6 @@ |
| 206 |
(names rocq_fix_code rocq_float64 rocq_memory rocq_values rocq_interp) |
| 207 |
(flags :standard (:include %{project_root}/config/dune.c_flags)))) |
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
(rule |
| 214 |
(targets rocq_instruct.h) |
| 215 |
(action (with-stdout-to %{targets} (run ../genOpcodeFiles.exe enum)))) |
| 216 |
--- coq.orig/kernel/dune |
| 217 |
+++ coq/kernel/dune |
| 218 |
@@ -7,6 +7,7 @@ |
| 219 |
(modules (:standard \ genOpcodeFiles uint63_31 uint63_63 float64_31 float64_63)) |
| 220 |
(libraries boot lib coqrun dynlink)) |
| 221 |
|
| 222 |
+; used by dune coq mode |
| 223 |
(deprecated_library_name |
| 224 |
(old_public_name coq-core.kernel) |
| 225 |
(new_public_name rocq-runtime.kernel)) |
| 226 |
--- coq.orig/lib/dune |
| 227 |
+++ coq/lib/dune |
| 228 |
@@ -5,11 +5,7 @@ |
| 229 |
(wrapped false) |
| 230 |
(modules_without_implementation xml_datatype) |
| 231 |
(libraries |
| 232 |
|
| 233 |
+ rocq-runtime.boot rocq-runtime.clib rocq-runtime.config findlib |
| 234 |
(select instr.ml from |
| 235 |
(!coqperf -> instr.noperf.ml) |
| 236 |
(coqperf -> instr.perf.ml)))) |
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
--- coq.orig/library/dune |
| 242 |
+++ coq/library/dune |
| 243 |
@@ -4,7 +4,3 @@ |
| 244 |
(public_name rocq-runtime.library) |
| 245 |
(wrapped false) |
| 246 |
(libraries kernel)) |
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
--- coq.orig/parsing/dune |
| 252 |
+++ coq/parsing/dune |
| 253 |
@@ -5,10 +5,6 @@ |
| 254 |
(modules_without_implementation notation_gram) |
| 255 |
(libraries rocq-runtime.gramlib interp)) |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
(rule |
| 262 |
(targets g_prim.ml) |
| 263 |
(deps (:mlg g_prim.mlg)) |
| 264 |
--- coq.orig/perf/dune |
| 265 |
+++ coq/perf/dune |
| 266 |
@@ -12,7 +12,3 @@ |
| 267 |
(= %{system} "linux_eabihf") |
| 268 |
(= %{system} "linux_elf") |
| 269 |
(= %{system} "elf")))) |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
--- coq.orig/plugins/btauto/dune |
| 275 |
+++ coq/plugins/btauto/dune |
| 276 |
@@ -4,10 +4,6 @@ |
| 277 |
(synopsis "Rocq's btauto plugin") |
| 278 |
(libraries rocq-runtime.plugins.ltac)) |
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
(rule |
| 285 |
(targets g_btauto.ml) |
| 286 |
(deps (:mlg g_btauto.mlg)) |
| 287 |
--- coq.orig/plugins/cc/dune |
| 288 |
+++ coq/plugins/cc/dune |
| 289 |
@@ -5,10 +5,6 @@ |
| 290 |
(modules (:standard \ g_congruence)) |
| 291 |
(libraries rocq-runtime.tactics)) |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
(library |
| 298 |
(name cc_plugin) |
| 299 |
(public_name rocq-runtime.plugins.cc) |
| 300 |
@@ -17,10 +13,6 @@ |
| 301 |
(flags :standard -open Cc_core_plugin) |
| 302 |
(libraries rocq-runtime.plugins.ltac rocq-runtime.plugins.cc_core)) |
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
(rule |
| 309 |
(targets g_congruence.ml) |
| 310 |
(deps (:mlg g_congruence.mlg)) |
| 311 |
--- coq.orig/plugins/derive/dune |
| 312 |
+++ coq/plugins/derive/dune |
| 313 |
@@ -4,10 +4,6 @@ |
| 314 |
(synopsis "Rocq's derive plugin") |
| 315 |
(libraries rocq-runtime.vernac)) |
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
(rule |
| 322 |
(targets g_derive.ml) |
| 323 |
(deps (:mlg g_derive.mlg)) |
| 324 |
--- coq.orig/plugins/extraction/dune |
| 325 |
+++ coq/plugins/extraction/dune |
| 326 |
@@ -4,10 +4,6 @@ |
| 327 |
(synopsis "Rocq's extraction plugin") |
| 328 |
(libraries rocq-runtime.vernac)) |
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
(rule |
| 335 |
(targets g_extraction.ml) |
| 336 |
(deps (:mlg g_extraction.mlg)) |
| 337 |
--- coq.orig/plugins/firstorder/dune |
| 338 |
+++ coq/plugins/firstorder/dune |
| 339 |
@@ -5,10 +5,6 @@ |
| 340 |
(modules (:standard \ g_ground)) |
| 341 |
(libraries rocq-runtime.tactics)) |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
(library |
| 348 |
(name firstorder_plugin) |
| 349 |
(public_name rocq-runtime.plugins.firstorder) |
| 350 |
@@ -17,10 +13,6 @@ |
| 351 |
(modules g_ground) |
| 352 |
(libraries rocq-runtime.plugins.firstorder_core rocq-runtime.plugins.ltac)) |
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
(rule |
| 359 |
(targets g_ground.ml) |
| 360 |
(deps (:mlg g_ground.mlg)) |
| 361 |
--- coq.orig/plugins/funind/dune |
| 362 |
+++ coq/plugins/funind/dune |
| 363 |
@@ -4,10 +4,6 @@ |
| 364 |
(synopsis "Rocq's functional induction plugin") |
| 365 |
(libraries rocq-runtime.plugins.ltac rocq-runtime.plugins.extraction)) |
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
(rule |
| 372 |
(targets g_indfun.ml) |
| 373 |
(deps (:mlg g_indfun.mlg)) |
| 374 |
--- coq.orig/plugins/ltac/dune |
| 375 |
+++ coq/plugins/ltac/dune |
| 376 |
@@ -6,10 +6,6 @@ |
| 377 |
(modules_without_implementation tacexpr) |
| 378 |
(libraries rocq-runtime.vernac)) |
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
(library |
| 385 |
(name tauto_plugin) |
| 386 |
(public_name rocq-runtime.plugins.tauto) |
| 387 |
@@ -17,10 +13,6 @@ |
| 388 |
(modules tauto) |
| 389 |
(libraries rocq-runtime.plugins.ltac)) |
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
(rule |
| 396 |
(targets extratactics.ml) |
| 397 |
(deps (:mlg extratactics.mlg)) |
| 398 |
--- coq.orig/plugins/ltac2/dune |
| 399 |
+++ coq/plugins/ltac2/dune |
| 400 |
@@ -5,10 +5,6 @@ |
| 401 |
(modules_without_implementation tac2expr tac2qexpr tac2types) |
| 402 |
(libraries vernac rocq-runtime.plugins.cc_core)) |
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
(rule |
| 409 |
(targets g_ltac2.ml) |
| 410 |
(deps (:mlg g_ltac2.mlg)) |
| 411 |
--- coq.orig/plugins/ltac2_ltac1/dune |
| 412 |
+++ coq/plugins/ltac2_ltac1/dune |
| 413 |
@@ -4,10 +4,6 @@ |
| 414 |
(synopsis "Ltac2 and Ltac1 interoperability plugin") |
| 415 |
(libraries ltac_plugin ltac2_plugin)) |
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
(rule |
| 422 |
(targets g_ltac2_ltac1.ml) |
| 423 |
(deps (:mlg g_ltac2_ltac1.mlg)) |
| 424 |
--- coq.orig/plugins/micromega/dune |
| 425 |
+++ coq/plugins/micromega/dune |
| 426 |
@@ -5,10 +5,6 @@ |
| 427 |
(synopsis "Rocq's micromega core plugin") |
| 428 |
(libraries zarith rocq-runtime.clib)) |
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
(library |
| 435 |
(name micromega_plugin) |
| 436 |
(public_name rocq-runtime.plugins.micromega) |
| 437 |
@@ -18,10 +14,6 @@ |
| 438 |
(synopsis "Rocq's micromega plugin") |
| 439 |
(libraries rocq-runtime.plugins.ltac rocq-runtime.plugins.micromega_core)) |
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
(executable |
| 446 |
(name csdpcert) |
| 447 |
(public_name csdpcert) |
| 448 |
@@ -37,10 +29,6 @@ |
| 449 |
(synopsis "Rocq's zify plugin") |
| 450 |
(libraries rocq-runtime.plugins.ltac)) |
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
(rule |
| 457 |
(targets g_micromega.ml) |
| 458 |
(deps (:mlg g_micromega.mlg)) |
| 459 |
--- coq.orig/plugins/nsatz/dune |
| 460 |
+++ coq/plugins/nsatz/dune |
| 461 |
@@ -5,10 +5,6 @@ |
| 462 |
(modules (:standard \ g_nsatz)) |
| 463 |
(libraries rocq-runtime.tactics)) |
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
(library |
| 470 |
(name nsatz_plugin) |
| 471 |
(public_name rocq-runtime.plugins.nsatz) |
| 472 |
@@ -17,10 +13,6 @@ |
| 473 |
(flags :standard -open Nsatz_core_plugin) |
| 474 |
(libraries rocq-runtime.plugins.nsatz_core rocq-runtime.plugins.ltac)) |
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
(rule |
| 481 |
(targets g_nsatz.ml) |
| 482 |
(deps (:mlg g_nsatz.mlg)) |
| 483 |
--- coq.orig/plugins/ring/dune |
| 484 |
+++ coq/plugins/ring/dune |
| 485 |
@@ -4,10 +4,6 @@ |
| 486 |
(synopsis "Rocq's ring plugin") |
| 487 |
(libraries rocq-runtime.plugins.ltac)) |
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
(rule |
| 494 |
(targets g_ring.ml) |
| 495 |
(deps (:mlg g_ring.mlg)) |
| 496 |
--- coq.orig/plugins/rtauto/dune |
| 497 |
+++ coq/plugins/rtauto/dune |
| 498 |
@@ -4,10 +4,6 @@ |
| 499 |
(synopsis "Rocq's rtauto plugin") |
| 500 |
(libraries rocq-runtime.plugins.ltac)) |
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
(rule |
| 507 |
(targets g_rtauto.ml) |
| 508 |
(deps (:mlg g_rtauto.mlg)) |
| 509 |
--- coq.orig/plugins/ssr/dune |
| 510 |
+++ coq/plugins/ssr/dune |
| 511 |
@@ -6,10 +6,6 @@ |
| 512 |
(flags :standard -open Gramlib) |
| 513 |
(libraries rocq-runtime.plugins.ssrmatching)) |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
(rule |
| 520 |
(targets ssrvernac.ml) |
| 521 |
(deps (:mlg ssrvernac.mlg)) |
| 522 |
--- coq.orig/plugins/ssrmatching/dune |
| 523 |
+++ coq/plugins/ssrmatching/dune |
| 524 |
@@ -4,10 +4,6 @@ |
| 525 |
(synopsis "Rocq ssrmatching plugin") |
| 526 |
(libraries rocq-runtime.plugins.ltac)) |
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
(rule |
| 533 |
(targets g_ssrmatching.ml) |
| 534 |
(deps (:mlg g_ssrmatching.mlg)) |
| 535 |
--- coq.orig/plugins/syntax/dune |
| 536 |
+++ coq/plugins/syntax/dune |
| 537 |
@@ -5,10 +5,6 @@ |
| 538 |
(modules g_number_string number_string) |
| 539 |
(libraries rocq-runtime.vernac)) |
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
(rule |
| 546 |
(targets g_number_string.ml) |
| 547 |
(deps (:mlg g_number_string.mlg)) |
| 548 |
--- coq.orig/pretyping/dune |
| 549 |
+++ coq/pretyping/dune |
| 550 |
@@ -5,7 +5,3 @@ |
| 551 |
(wrapped false) |
| 552 |
(modules_without_implementation locus pattern glob_term ltac_pretype) |
| 553 |
(libraries engine)) |
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
--- coq.orig/printing/dune |
| 559 |
+++ coq/printing/dune |
| 560 |
@@ -4,7 +4,3 @@ |
| 561 |
(public_name rocq-runtime.printing) |
| 562 |
(wrapped false) |
| 563 |
(libraries parsing proofs)) |
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
--- coq.orig/proofs/dune |
| 569 |
+++ coq/proofs/dune |
| 570 |
@@ -5,7 +5,3 @@ |
| 571 |
(wrapped false) |
| 572 |
(modules_without_implementation tactypes) |
| 573 |
(libraries pretyping)) |
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
--- coq.orig/stm/dune |
| 579 |
+++ coq/stm/dune |
| 580 |
@@ -6,7 +6,3 @@ |
| 581 |
; until ocaml/dune#4892 fixed |
| 582 |
; (private_modules dag proofBlockDelimiter tQueue vcs workerPool) |
| 583 |
(libraries sysinit coqworkmgrApi)) |
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
--- coq.orig/sysinit/dune |
| 589 |
+++ coq/sysinit/dune |
| 590 |
@@ -5,11 +5,7 @@ |
| 591 |
(modules coqargs) |
| 592 |
(wrapped false) |
| 593 |
; don't depend on rocq-runtime.lib -> impossible to imperatively set random flags |
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
|
| 599 |
+ (libraries rocq-runtime.config rocq-runtime.boot rocq-runtime.clib rocq-runtime.lib)) |
| 600 |
|
| 601 |
(library |
| 602 |
(name sysinit) |
| 603 |
@@ -18,7 +14,3 @@ |
| 604 |
(wrapped false) |
| 605 |
(modules :standard \ coqargs) |
| 606 |
(libraries rocq-runtime.boot rocq-runtime.vernac coqargs findlib)) |
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
--- coq.orig/tactics/dune |
| 612 |
+++ coq/tactics/dune |
| 613 |
@@ -7,7 +7,3 @@ |
| 614 |
; until ocaml/dune#4892 fixed |
| 615 |
; (private_modules btermdn dn) |
| 616 |
(libraries printing)) |
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
--- coq.orig/test-suite/dune |
| 622 |
+++ coq/test-suite/dune |
| 623 |
@@ -9,7 +9,9 @@ |
| 624 |
|
| 625 |
(rule |
| 626 |
(targets test_suite_config.inc) |
| 627 |
|
| 628 |
+ (mode (promote (until-clean))) |
| 629 |
+ (deps (package rocq-runtime)) |
| 630 |
+ (action (with-stdout-to %{targets} (run tools/coq_config_to_make.exe rocq)))) |
| 631 |
|
| 632 |
(rule |
| 633 |
(targets summary.log) |
| 634 |
--- coq.orig/tools/coqdep/lib/dune |
| 635 |
+++ coq/tools/coqdep/lib/dune |
| 636 |
@@ -3,4 +3,8 @@ |
| 637 |
(public_name rocq-runtime.coqdeplib) |
| 638 |
(libraries rocq-runtime.boot rocq-runtime.lib findlib.internal)) |
| 639 |
|
| 640 |
|
| 641 |
+(rule |
| 642 |
+ (target lexer.ml) |
| 643 |
+ (deps lexer.mll) |
| 644 |
+ (action (chdir %{workspace_root} |
| 645 |
+ (run %{bin:ocamllex} -ml -q -o %{target} %{deps})))) |
| 646 |
--- coq.orig/tools/coqdep/lib/file_util.ml |
| 647 |
+++ coq/tools/coqdep/lib/file_util.ml |
| 648 |
@@ -37,3 +37,14 @@ |
| 649 |
match normalize [] path with |
| 650 |
| [] -> "." |
| 651 |
| path -> String.concat "/" path |
| 652 |
+ |
| 653 |
+let is_prefix a b = |
| 654 |
+ let a = Str.split_delim re_delim a in |
| 655 |
+ let b = Str.split_delim re_delim b in |
| 656 |
+ let rec aux a b = |
| 657 |
+ match a, b with |
| 658 |
+ | [], _ -> true |
| 659 |
+ | x :: a, y :: b -> String.equal x y && aux a b |
| 660 |
+ | _ :: _, [] -> false |
| 661 |
+ in |
| 662 |
+ aux a b |
| 663 |
--- coq.orig/tools/coqdep/lib/file_util.mli |
| 664 |
+++ coq/tools/coqdep/lib/file_util.mli |
| 665 |
@@ -24,3 +24,5 @@ |
| 666 |
["../../dir/file.v"] are possible return values, but ["./file.v"] and |
| 667 |
["dir1/../dir2"] are not. *) |
| 668 |
val normalize_path : string -> string |
| 669 |
+ |
| 670 |
+val is_prefix : string -> string -> bool |
| 671 |
--- coq.orig/tools/coqdep/lib/fl.ml |
| 672 |
+++ coq/tools/coqdep/lib/fl.ml |
| 673 |
@@ -61,7 +61,7 @@ |
| 674 |
(* relativize the path if inside the current dune workspace |
| 675 |
if we relativize paths outside the dune workspace it fails so make sure to avoid it *) |
| 676 |
match Sys.getenv_opt "DUNE_SOURCEROOT" with |
| 677 |
|
| 678 |
+ | Some dune when File_util.is_prefix (Filename.concat dune "_build") path -> |
| 679 |
normalize_path (to_relative_path path) |
| 680 |
| _ -> normalize_path path |
| 681 |
|
| 682 |
--- coq.orig/tools/coqdoc/dune |
| 683 |
+++ coq/tools/coqdoc/dune |
| 684 |
@@ -15,7 +15,7 @@ |
| 685 |
(library |
| 686 |
(name coqdoclib) |
| 687 |
(modules :standard \ coqdoc) |
| 688 |
|
| 689 |
+ (libraries str rocq-runtime.boot rocq-runtime.config rocq-runtime.clib rocq-runtime.lib)) |
| 690 |
|
| 691 |
(executable |
| 692 |
(name coqdoc) |
| 693 |
--- coq.orig/tools/coqworkmgr/dune |
| 694 |
+++ coq/tools/coqworkmgr/dune |
| 695 |
@@ -5,10 +5,6 @@ |
| 696 |
(wrapped false) |
| 697 |
(libraries str unix)) |
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
(library |
| 704 |
(name rocqworkmgr) |
| 705 |
(modules rocqworkmgr) |
| 706 |
--- coq.orig/toplevel/dune |
| 707 |
+++ coq/toplevel/dune |
| 708 |
@@ -10,10 +10,6 @@ |
| 709 |
(memtrace -> memtrace_init.memtrace.ml) |
| 710 |
(!memtrace -> memtrace_init.default.ml)))) |
| 711 |
|
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
; Interp provides the `zarith` library to plugins, we could also use |
| 717 |
; -linkall in the plugins file, to be discussed. |
| 718 |
|
| 719 |
--- coq.orig/vernac/dune |
| 720 |
+++ coq/vernac/dune |
| 721 |
@@ -8,10 +8,6 @@ |
| 722 |
; (private_modules comProgramFixpoint egramcoq) |
| 723 |
(libraries tactics parsing findlib.dynload)) |
| 724 |
|
| 725 |
|
| 726 |
|
| 727 |
|
| 728 |
|
| 729 |
(rule |
| 730 |
(targets g_proofs.ml) |
| 731 |
(deps (:mlg g_proofs.mlg)) |
| 732 |
--- coq.orig/clib/cList.ml |
| 733 |
+++ coq/clib/cList.ml |
| 734 |
@@ -19,7 +19,7 @@ |
| 735 |
type 'a cell = { |
| 736 |
head : 'a; |
| 737 |
mutable tail : 'a list; |
| 738 |
|
| 739 |
+} [@@warning "-unused-field"] |
| 740 |
|
| 741 |
external cast : 'a cell -> 'a list = "%identity" |
| 742 |
|
| 743 |
--- coq.orig/lib/spawn.ml |
| 744 |
+++ coq/lib/spawn.ml |
| 745 |
@@ -157,7 +157,6 @@ |
| 746 |
cout : out_channel; |
| 747 |
oob_resp : in_channel option; |
| 748 |
oob_req : out_channel option; |
| 749 |
|
| 750 |
pid : int; |
| 751 |
mutable watch : ML.watch_id option; |
| 752 |
mutable alive : bool; |
| 753 |
@@ -192,7 +191,7 @@ |
| 754 |
Unix.set_nonblock (fst main); |
| 755 |
let gchan = ML.async_chan_of_file_or_socket (fst main) in |
| 756 |
let alive, watch = true, None in |
| 757 |
|
| 758 |
+ let p = { cin; cout; pid; oob_resp; oob_req; alive; watch } in |
| 759 |
p.watch <- Some ( |
| 760 |
ML.add_watch ~callback:(fun cl -> |
| 761 |
try |