diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-12 10:35:40 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-12 10:48:35 +0100 |
commit | 329b71b7400b8bcf387a8c5551356ab9d76584b8 (patch) | |
tree | e001525529e94d314d4903cd2499f7a69331393e /tests/scanner/Makefile.am | |
parent | f606183a010fbec4382acb728882cc0eddbaf7f7 (diff) | |
download | gobject-introspection-329b71b7400b8bcf387a8c5551356ab9d76584b8.tar.gz |
autotools: don't pass all the libregress cflags to the scanner. Fixes #226
They contain things like -fvisibility=hidden which, in case of building with
CFLAGS="-flto -O2" LDFLAGS="-Wl,--as-needed -flto", results in the linker
throwing out unused symbols and not linking the dumper against libregress.
This results in errors like:
Invalid GType function: 'regress_test_enum_get_type'
Failed to find symbol 'regress_test_enum_get_type'
Fix this by only passing the required CFLAGS to the scanner instead.
Diffstat (limited to 'tests/scanner/Makefile.am')
-rw-r--r-- | tests/scanner/Makefile.am | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am index 89bfed90..fccbd352 100644 --- a/tests/scanner/Makefile.am +++ b/tests/scanner/Makefile.am @@ -91,7 +91,10 @@ GIRS += SLetter-1.0.gir Regress-1.0.gir: $(top_builddir)/Gio-2.0.gir Utility-1.0.gir libregress.la Regress_1_0_gir_LIBS = libregress.la -Regress_1_0_gir_CFLAGS = $(libregress_la_CPPFLAGS) $(libregress_la_CFLAGS) -include "glib.h" +Regress_1_0_gir_CFLAGS = $(GI_SCANNER_CFLAGS) +if !HAVE_CAIRO +Regress_1_0_gir_CFLAGS += -D_GI_DISABLE_CAIRO +endif Regress_1_0_gir_INCLUDES = Gio-2.0 Utility-1.0 if HAVE_CAIRO Regress_1_0_gir_INCLUDES += cairo-1.0 |