diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2023-01-31 01:07:14 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2023-08-16 16:33:04 +0100 |
commit | ba4d5fbd5dad46c84e38ffbb032799a7a9380f42 (patch) | |
tree | 95df3dcf55174b6da5064ed8a2ebb1bd6e25e694 /boilerplate | |
parent | ff02c2c2684d9eecb2f5fefe689fe60ff8e98280 (diff) |
Build with hidden symbols by default
We should default on every platform we care about to hidden symbols, to
avoid leaking private symbols.
On Windows this is the default state of affairs with the MSVC toolchain;
with GCC and GCC-compatible toolchains, we need to opt into this
behaviour. Luckily for us, Cairo already has an annotation for public
symbols, so we can easily tweak it to include the visibility attribute.
When building ancillary libraries as part of the Cairo compilation on
Windows, we use a pre-processor symbol to ensure that we keep the
dllexport annotation. This avoids including the cairoint.h header file.
Fixes: #582
Diffstat (limited to 'boilerplate')
-rw-r--r-- | boilerplate/meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/boilerplate/meson.build b/boilerplate/meson.build index 450eabf3e..544bfcc09 100644 --- a/boilerplate/meson.build +++ b/boilerplate/meson.build @@ -28,6 +28,7 @@ cairo_boilerplate_constructors = custom_target('cairo-boilerplate-constructors.c libcairoboilerplate = static_library('cairoboilerplate', cairo_boilerplate_sources + [cairo_boilerplate_constructors], include_directories: [incbase], dependencies: deps + [libcairo_dep], + c_args: ['-DCAIRO_COMPILATION'], install: false, build_by_default: false, ) |