; Since dune language 3.21 the dev profile compiles with the compiler's ; default warnings, which leave unused values, opens and fields unreported. ; Keep dune's stricter development set. ; ; A C warning is an error in every profile but release, which must not break ; on a warning a future compiler adds. ; ; The sanitize profile, run on Linux, builds the C under AddressSanitizer and ; UndefinedBehaviorSanitizer. rig's env adds the debug runtime and a stressed ; collector, which check a heap so often that suites holding large heaps, such ; as compress's, outran their time. A domain's thread ; exits on the signal stack the OCaml runtime allocated, which ; AddressSanitizer would unmap as its own (use_sigaltstack=0). A refused ; allocation returns NULL as libc's does (allocator_may_return_null=1). CUDA ; and NV map GPU addresses below 2^40, in the shadow gap ; (protect_shadow_gap=0). ; ; The tsan profile, which dune-workspace.tsan sets with a compiler built for ; ThreadSanitizer, compiles the C with the flags that compiler builds its own ; runtime with, so a race through a stub is reported as one through OCaml is. ; A lock-order inversion is reported with both acquisitions' stacks ; (second_deadlock_stack=1). A child forked from a process running threads ; may start threads of its own, as rig's pool does (die_after_fork=0). A ; refused allocation returns NULL as libc's does (allocator_may_return_null=1). ; ; Since dune 3.24 mdx's generator links with the profile's link_flags, so a ; sanitizer's runtime reaches it and sanitized C can link into it. An mdx ; stanza whose libraries hold C is still off under sanitize and tsan: no run ; has shown it passes there on Linux. ; ; An odoc warning is an error in every profile. ; ; WINDTRAP_TIMEOUT bounds each test that sets no ~timeout, so a hung test ; cannot block a shared watch server. Under tsan it is 15 times longer, ; ThreadSanitizer's slowdown at most, and RIG_TEST_TIME_SCALE makes rig's ; suites scale their own timeouts as much. ; ; CACHEDB and XDG_CACHE_HOME put tolk's disk cache, and the files tolk caches ; beside it, in a directory cache of each action's working directory, inside ; _build: a test run reads no entry a user's run wrote and writes none to the ; user's cache. (env (dev (flags (:standard %{dune-warnings})) (c_flags (:standard -std=c11 -Wall -Wextra -Werror)) (odoc (warnings fatal)) (env-vars (WINDTRAP_TIMEOUT 60) (CACHEDB cache) (XDG_CACHE_HOME cache))) (release (c_flags (:standard -std=c11 -Wall -Wextra)) (odoc (warnings fatal)) (env-vars (WINDTRAP_TIMEOUT 60) (CACHEDB cache) (XDG_CACHE_HOME cache))) (sanitize (c_flags (:standard -std=c11 -Wall -Wextra -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined)) (link_flags (:standard -cclib -fsanitize=address,undefined)) (env-vars (ASAN_OPTIONS halt_on_error=1:detect_leaks=0:use_sigaltstack=0:allocator_may_return_null=1:protect_shadow_gap=0) (UBSAN_OPTIONS halt_on_error=1:print_stacktrace=1) (WINDTRAP_TIMEOUT 60) (CACHEDB cache) (XDG_CACHE_HOME cache)) (odoc (warnings fatal))) (tsan (c_flags (:standard -std=c11 -Wall -Wextra -Werror -g -fno-omit-frame-pointer %{ocaml-config:ocamlopt_cflags})) (env-vars (TSAN_OPTIONS second_deadlock_stack=1:die_after_fork=0:allocator_may_return_null=1) (RIG_TEST_TIME_SCALE 15) (WINDTRAP_TIMEOUT 900) (CACHEDB cache) (XDG_CACHE_HOME cache)) (odoc (warnings fatal))) (_ (c_flags (:standard -std=c11 -Wall -Wextra -Werror)) (odoc (warnings fatal)) (env-vars (WINDTRAP_TIMEOUT 60) (CACHEDB cache) (XDG_CACHE_HOME cache))))