From 04fa0d5e5652429054241b3f75f81b6bc0228da8 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 23 Jul 2023 18:29:14 +0200 Subject: [PATCH] [really re-add -fvisibility-inlines-hidden on Apple targets] --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3617406ff81..83a4c0739ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -686,7 +686,7 @@ if(NOT WIN32 AND NOT CYGWIN) # different translation units being compiled with different visibility settings." # See LLVM's cmake/modules/HandleLLVMOptions.cmake. check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG) - if (UNIX AND LDC_ENABLE_PLUGINS) + if (LDC_ENABLE_PLUGINS AND NOT APPLE) # For plugins, we shouldn't apply this flag because it hides the inline methods of e.g. Visitor. On macOS it's OK to add. elseif (${SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG}) append("-fvisibility-inlines-hidden" LDC_CXXFLAGS)