<div dir="ltr">I'm setting up a Clang toolchain build on Windows. We need to include runtimes for several targets including Windows, Linux and Fuchsia. In the case of Windows and Linux we only want to provide static libc++. In the case of Fuchsia we want to provide both static and shared.<div><br></div><div>This leads to an issue: because of this condition <a href="https://github.com/llvm/llvm-project/blob/9a48411f35a122ac8755a8453887b919c77daf3f/libcxx/CMakeLists.txt#L861">https://github.com/llvm/llvm-project/blob/9a48411f35a122ac8755a8453887b919c77daf3f/libcxx/CMakeLists.txt#L861</a>, _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS is set to ON for Windows, but to OFF on Linux and Fuchsia. Since this definition is a part of __<a href="http://config_site.in">config_site.in</a> <a href="https://github.com/llvm/llvm-project/blob/9a48411f35a122ac8755a8453887b919c77daf3f/libcxx/include/__config_site.in#L28">https://github.com/llvm/llvm-project/blob/9a48411f35a122ac8755a8453887b919c77daf3f/libcxx/include/__config_site.in#L28</a> we cannot use a single __config that would be usable for all targets which breaks the build of our toolchain.</div><div><br></div><div>Does anyone know why we have that condition? Why is it only restricted to Windows? It's not clear to me why libc++ on Windows should be different from other platforms. Users that want to disable visibility annotations can always set _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS in their build which is what projects like Chromium and Fuchsia already do.</div></div>