[Webkit-unassigned] [Bug 232933] FindGObjectIntrospection.cmake: prefix variables obtained from pkg-config with PKG_CONFIG_SYSROOT_DIR

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 15 05:18:24 PST 2022


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

Michael Catanzaro <mcatanzaro at gnome.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at gnome.org
 Attachment #443789|review?                     |review-
              Flags|                            |

--- Comment #2 from Michael Catanzaro <mcatanzaro at gnome.org> ---
Comment on attachment 443789
  --> https://bugs.webkit.org/attachment.cgi?id=443789
Patch

It took me a little while to convince myself that this was correct, but I suppose there's no way for cross-compilation to work otherwise, so OK.

That said, not all pkg-config variables are paths, but you're prepending this to all of them, e.g. version numbers are now going to contain filesystem paths. Also, it's generally not appropriate to prepend this variable even to most filesystem paths: it only makes sense in this particular case because you're executing those binaries during the build itself. Now, because the macro is only used immediately below, we know that's not a problem with how it is currently used, but it is still a semantic problem that we need to solve before landing. You can fix it in either of two ways: you could rename the macro to indicate it is only supposed to be used to get paths to binaries for use during compilation (this might result in a weird name, _GIR_GET_ PKGCONFIG_VAR_BUT_ONLY_IF_ITS_A_PATH_TO_A_BINARY_THAT_WE_ARE_ABOUT_TO_EXECUTE does not sound very swell), or maybe it would be better to do the append later after calling the macro so that we can leave it as a generic macro for getting any variable. Either way would work.

-- 
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/20220215/fdad815c/attachment.htm>


More information about the webkit-unassigned mailing list