bazel-contrib / rules_foreign_cc

Build rules for interfacing with "foreign" (non-Bazel) build systems (CMake, configure-make, GNU Make, boost, ninja, Meson)
https://bazel-contrib.github.io/rules_foreign_cc
Apache License 2.0
680 stars 249 forks source link

Improve flags handling for meson #1303

Open mering opened 1 month ago

mering commented 1 month ago

This aligns this to what other tools are doing. The _join_flags_list() pattern is also used for other foreign build tools.

This is required to fix --sysroot flag even without cross compiling for example when using in combination with a hermetic toolchain. This flag is only available in get_flags_info() and for the complicated ffmpeg build this works flawlessly. Without it being absolute, it doesn't work.

This is required to fix libdav1d in #1295.

voxeljorge commented 1 month ago

I have been able to reproduce the error in a similar build and can confirm that this patch fixes my error, which also was due to the --sysroot flag being a relative path instead of an absolute path before being passed to meson.