[runtime] Add an options API. (#32595)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Thu, 15 Oct 2020 15:25:38 +0000 (11:25 -0400)
committerGitHub <noreply@github.com>
Thu, 15 Oct 2020 15:25:38 +0000 (17:25 +0200)
commiteb1756e97d23df13bc6fe798e3566935c5caa7d0
treee6d0df566ac6f7a33963c3196c736a883acc0354
parent7dd4658e2dd81d61cd873efab62edec57df62c29
[runtime] Add an options API. (#32595)

* [runtime] Add an options API.

Add a general options API to the runtime, based on the flags API in Google V8:

```https://chromium.googlesource.com/v8/v8.git/+/refs/heads/master/src/flags/```

Supported features:
* Definition of runtime options in a declarative way.
* Options are mapped to C globals.
* BOOL/INT/STRING data types.
* Generic option parsing code.
* Generic usage code.
* Read-only flags for build-time optimization.

This is designed to replace the many option parsing functions in
the runtime, MONO_DEBUG, the many mono_set_... functions etc.

* Fix the build.

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
src/mono/mono/mini/driver.c
src/mono/mono/utils/CMakeLists.txt
src/mono/mono/utils/Makefile.am
src/mono/mono/utils/options-def.h [new file with mode: 0644]
src/mono/mono/utils/options.c [new file with mode: 0644]
src/mono/mono/utils/options.h [new file with mode: 0644]
src/mono/msvc/libmonoutils-common.targets
src/mono/msvc/libmonoutils-common.targets.filters