Win: Don't use GCC/Clang visibility attribute

Symbols are hidden by default on Windows, so
__attribute__((visibility("hidden"))) produced a warning ("visibility
attribute not supported in this configuration; ignored") with certain
versions of MinGW if libjpeg-turbo was built without SIMD extensions.
This commit is contained in:
DRC
2025-09-23 08:40:41 -04:00
parent 8af737edbe
commit c53932d12d

View File

@@ -525,7 +525,7 @@ if(UNIX)
endif()
endif()
if(NOT MSVC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
if(NOT WIN32)
check_c_source_compiles("extern const int table[1]; const int __attribute__((visibility(\"hidden\"))) table[1] = { 0 }; int main(void) { return table[0]; }"
HIDDEN_WORKS)
if(HIDDEN_WORKS)