diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-12-13 00:34:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-13 00:34:16 +0800 |
| commit | 48ac6f25ff53290850a0edff0285dc3e1a350ad3 (patch) | |
| tree | 2388d19d2943980c92a4a719d73a7f1fbbb750d9 /include | |
| parent | 7279c0419409dfe609b0f147df0a7ab357559e69 (diff) | |
Correctly distinguish between windows and MSVC (#5851)
Partially sorts https://github.com/shader-slang/slang/issues/5843
Diffstat (limited to 'include')
| -rw-r--r-- | include/slang.h | 7 |
1 files changed, 3 insertions, 4 deletions
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 |
