PEP 517: Debug vs. Release Builds

When building a wheel with native code, a PEP 517 backend can either build in debug mode or in release mode. For cases where the package is installed as a dependency, a user most likely wants a release build, but e.g. when testing with tox and build isolation, a much faster debug build is better. It would be ideal if the build frontend could decide which kind of build it wants.

PEP 517 introduces config_settings for passing configuration from the frontend to the backend without specifying the semantics. Would it be possible to extend PEP 517 or to introduce a convention how to communicate the prefered build mode between frontend and the backend, e.g. using config_settings["build_mode"] with either "release" or "debug" as value? If so, what would be the steps required to introduce such a field?