[Webkit-unassigned] [Bug 244840] [GLib] Recording build options and provide a way of inspecting them

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 6 05:07:03 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244840

--- Comment #1 from Adrian Perez <aperez at igalia.com> ---
My suggestion here would be to have CMake generate a preprocessor
symbol which expands to a string that contains the list of CMake
build options which have a non-default value. Listing all would make
the list quite long, and we are only really interested in on-default
values (we can always check the defaults from the source code).

Then, I would add a new webkit_get_version_string() function which
would return said string concatenated after the version numbers.
Basically, this:

  const char* webkit_get_version_string(void) {
      return STRINGIZE(WEBKIT_MAJOR_VERSION) "."
             STRINGIZE(WEBKIT_MINOR_VERSION) "."
             STRINGIZE(WEBKIT_MICRO_VERSION)
             WEBKIT_NONDEFAULT_CMAKE_OPTIONS_STRING;
  }

The WEBKIT_NONDEFAULT_CMAKE_OPTIONS_STRING would be a series of
zero or more space-and-option-name items, alphabetically sorted,
e.g. " -DENABLE_WEB_RTC=ON -DUSE_ANGLE_WEBGL=OFF -DUSE_AVIF=OFF".
This way the output from printing webkit_get_version_string() can
be almost copied as-is into a CMake command line.

Also I think we would need to always include -DDEVELOPER_MODE=ON
and -DENABLE_EXPERIMENTAL_FEATURES=ON in case they are enabled,
because they affect the default values of build options.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220906/cec3f860/attachment.htm>


More information about the webkit-unassigned mailing list