From 48ac6f25ff53290850a0edff0285dc3e1a350ad3 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 13 Dec 2024 00:34:16 +0800 Subject: Correctly distinguish between windows and MSVC (#5851) Partially sorts https://github.com/shader-slang/slang/issues/5843 --- include/slang.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/slang.h b/include/slang.h index 2ba7150ec..24db0a6ff 100644 --- a/include/slang.h +++ b/include/slang.h @@ -227,10 +227,9 @@ convention for interface methods. #if defined(_MSC_VER) #define SLANG_DLL_EXPORT __declspec(dllexport) #else - #if 0 && __GNUC__ >= 4 -// Didn't work on latest gcc on linux.. so disable for now -// https://gcc.gnu.org/wiki/Visibility - #define SLANG_DLL_EXPORT __attribute__((dllexport)) + #if SLANG_WINDOWS_FAMILY + #define SLANG_DLL_EXPORT \ + __attribute__((dllexport)) __attribute__((__visibility__("default"))) #else #define SLANG_DLL_EXPORT __attribute__((__visibility__("default"))) #endif -- cgit v1.2.3