The default depend on the build profile and are hard-coded in dune. You can find out the set of active flags for a given directory by running dune printenv. If you have no special configuration, this will give you the set of default flags:
To set the flags globally, you should indeed write an env stanza as you mentioned.
jsoo flags are currently not covered by this mechanism, but they indeed should. Do you mind opening an issue on the dune github project to track this feature?
I’m new to ocaml/dune and trying to do the same project-wide configuration of the flags. I couldn’t figure out a way to add an env stanza to the dune-project file. Is it idiomatic to have top level dune-project and dune files?