mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-24 04:17:34 +00:00

This fixes two issues that are observed after 5111286f06e1e10f24745007a45a830760f1790c: For builds with GCC with LLVM_LINK_LLVM_DYLIB=ON, we previously got build errors, as libclang-cpp.dll suddenly only contained the functions that were marked dllexport via REPL_EXTERNAL_VISIBILITY, instead of all symbols as expected. For MinGW builds with Clang, building previously succeeded (as it used either the __attribute__((visibility("default"))) annotation or nothing at all), and the functions were exported from libclang-cpp.dll if that was built, but the unit test failed (as neither of those cases made the functions exported from an EXE). Don't use the visibility attributes on MinGW targets for these purposes; setting default visibility only makes a difference if building with e.g. -fvisibility=hidden, but it doesn't make the symbols exported from an EXE. Differential Revision: https://reviews.llvm.org/D151620