Ludovic Courtès writes: > Marius Bakke skribis: > >> * guix/build/meson-build-system.scm (configure): Set LDFLAGS before invoking meson. > > [...] > >> + (setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib")) > > Can we pass them as an argument to ‘meson’ somehow instead of defining a > global variable? > > (For example Autoconf-generated configure scripts can read variable > definitions passed as arguments: > > ./configure LDFLAGS=foo > > That way we don’t have to define the variable globally, which could have > unintended effects.) > > If not, that’s fine. Unfortunately, this is the only supported way of adding extra linker flags and similar. http://mesonbuild.com/howtox.html#set-extra-compiler-and-linker-flags-from-the-outside-when-eg-building-distro-packages There are some open tickets about being able to specify environment in build definitions, in which case we might be able to add them there. But for now, this is the way to go.