-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#19226) pixman: fix static and allow shared MSVC build
* pixman: avoid __declspec(dllexport) for static MSVC build * pixman/0.40.0: enable shared MSVC build
- Loading branch information
Showing
3 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 48d5df1f3772a08a929dcb3b2fe4d7b1853223c9 Mon Sep 17 00:00:00 2001 | ||
From: Benjamin Gilbert <bgilbert@backtick.net> | ||
Date: Thu, 5 Jan 2023 20:29:00 -0500 | ||
Subject: [PATCH] meson: don't dllexport when built as static library | ||
|
||
If a static Pixman is linked with a dynamic library, Pixman shouldn't | ||
export its own symbols into the latter's ABI. | ||
--- | ||
pixman/meson.build | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/pixman/meson.build b/pixman/meson.build | ||
index 5dce870..62ec66b 100644 | ||
--- a/pixman/meson.build | ||
+++ b/pixman/meson.build | ||
@@ -31,7 +31,8 @@ version_h = configure_file( | ||
) | ||
|
||
libpixman_extra_cargs = [] | ||
-if cc.has_function_attribute('dllexport') | ||
+default_library = get_option('default_library') | ||
+if default_library != 'static' and cc.has_function_attribute('dllexport') | ||
libpixman_extra_cargs = ['-DPIXMAN_API=__declspec(dllexport)'] | ||
endif | ||
|
||
-- | ||
GitLab | ||
|