[llvm] [LLVM]Fix symbol visibility macros not being define for AIX (PR #107705)

Thomas Fransham via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 7 09:14:10 PDT 2024


https://github.com/fsfod created https://github.com/llvm/llvm-project/pull/107705

This is to try and fix buildbot failure on [clang-ppc64-aix](https://lab.llvm.org/buildbot/#/builders/64/builds/881) from my changes in #96630.  I don't really know much about AIX so it would be good to have someone more knowledgeable to say if visibility macros on extern templates is needed on AIX similar to ELF.  @compnerd @tstellar 

>From 052e5ec0e474196f961181786fac977ae8e64d31 Mon Sep 17 00:00:00 2001
From: Thomas Fransham <tfransham at gmail.com>
Date: Sat, 7 Sep 2024 16:06:13 +0100
Subject: [PATCH] Fix symbol visibility macros not being define for AIX

---
 llvm/include/llvm/Support/Compiler.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index 140ff611af79fb..1d2d751d4dc11a 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -189,7 +189,7 @@
 #define LLVM_TEMPLATE_ABI __declspec(dllimport)
 #define LLVM_EXPORT_TEMPLATE
 #endif
-#elif defined(__ELF__) || defined(__MINGW32__)
+#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX)
 #define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define LLVM_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
 #define LLVM_EXPORT_TEMPLATE



More information about the llvm-commits mailing list