[all-commits] [llvm/llvm-project] 1eb812: [VE] Fix initializer visibility

Sergei Trofimovich via All-commits all-commits at lists.llvm.org
Mon Oct 19 14:55:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1eb812e06d0f02382f4e91bbc9b74029a7635bd6
      https://github.com/llvm/llvm-project/commit/1eb812e06d0f02382f4e91bbc9b74029a7635bd6
  Author: Sergei Trofimovich <slyfox at inbox.ru>
  Date:   2020-10-19 (Mon, 19 Oct 2020)

  Changed paths:
    M llvm/lib/Target/VE/Disassembler/VEDisassembler.cpp
    M llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp
    M llvm/lib/Target/VE/TargetInfo/VETargetInfo.cpp
    M llvm/lib/Target/VE/VEAsmPrinter.cpp
    M llvm/lib/Target/VE/VETargetMachine.cpp

  Log Message:
  -----------
  [VE] Fix initializer visibility

Before the change attempt to link libLTO.so against shared
LLVM library failed as:

```
[ 76%] Linking CXX shared library ../../lib/libLTO.so
... /usr/bin/cmake -E cmake_link_script CMakeFiles/LTO.dir/link.txt --verbose=1
c++ -o ...libLTO.so.12git ...ibLLVM-12git.so
ld: CMakeFiles/LTO.dir/lto.cpp.o: in function `llvm::InitializeAllTargetInfos()':
include/llvm/Config/Targets.def:31: undefined reference to `LLVMInitializeVETargetInfo'
```

It happens because on linux llvm build system sets default
symbol visibility to "hidden". The fix is to set visibility
back to "default" for exported APIs with LLVM_EXTERNAL_VISIBILITY.

Bug: https://bugs.llvm.org/show_bug.cgi?id=47847

Reviewed By: simoll

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




More information about the All-commits mailing list