This will allow for adding the flags both at top level and in the
submodules (e.g. secp256k1) whithout duplicating them on the command
line, thus allowing these submodules to build standalone.
Note: duplicating the flag is not very expensive as the check result is
already in cache.
Depends on D3825.