[all-commits] [llvm/llvm-project] 606348: [MinGW] Don't currently set visibility=hidden when...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Jul 21 13:17:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 606348cc72389de481c014afb0f15af7360fc950
      https://github.com/llvm/llvm-project/commit/606348cc72389de481c014afb0f15af7360fc950
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-07-21 (Thu, 21 Jul 2022)

  Changed paths:
    M llvm/lib/Target/CMakeLists.txt

  Log Message:
  -----------
  [MinGW] Don't currently set visibility=hidden when building for MinGW

If we build the Target libraries with -fvisibility=hidden, then
LLVM_EXTERNAL_VISIBILITY must also be able to override it back
to default visibility.

Currently, the LLVM_EXTERNAL_VISIBILITY define is a no-op for
mingw targets, thus set CMAKE_CXX_VISIBILITY_PRESET correspondingly.

This unbreaks the mingw dylib build, if the compiler actually
takes hidden visiblity into account (e.g. after D130121).

(Later, once hidden visiblity can be used for MinGW targets, we
can make LLVM_EXTERNAL_VISIBILITY and LLVM_LIBRARY_VISIBILITY expand
to actual attributes, and reverse this commit.)

Differential Revision: https://reviews.llvm.org/D130200




More information about the All-commits mailing list