[all-commits] [llvm/llvm-project] 71e97a: Only define LLVM_EXTERNAL_VISIBILITY when building...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Tue Dec 14 09:59:21 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71e97ad35b2abcc89cc8ff471a3eb404120cf208
      https://github.com/llvm/llvm-project/commit/71e97ad35b2abcc89cc8ff471a3eb404120cf208
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2021-12-14 (Tue, 14 Dec 2021)

  Changed paths:
    M llvm/include/llvm/Config/llvm-config.h.cmake
    M llvm/include/llvm/Support/Compiler.h

  Log Message:
  -----------
  Only define LLVM_EXTERNAL_VISIBILITY when building libLLVM dylib

When building LLVM static libraries, we should not make symbols more
visible than CMAKE_CXX_VISIBILITY_PRESET, since the goal may be to have
a purely hidden llvm embedded in another library. Instead, we only
define LLVM_EXTERNAL_VISIBILITY for the dynamic library build (when
LLVM_BUILD_LLVM_DYLIB=YES).

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




More information about the All-commits mailing list