[AIX][compiler-rt] Pick the right form of COMPILER_RT_ALIAS for AIX
authorDavid Tenty <daltenty@ibm.com>
Tue, 16 Jun 2020 18:00:32 +0000 (14:00 -0400)
committerDavid Tenty <daltenty@ibm.com>
Tue, 16 Jun 2020 18:10:40 +0000 (14:10 -0400)
Summary: we use the alias attribute, similar to what is done for ELF.

Reviewers: ZarkoCA, jasonliu, hubert.reinterpretcast, sfertile

Reviewed By: jasonliu

Subscribers: dberris, aheejin, mstorsjo, #sanitizers

Tags: #sanitizers

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

compiler-rt/lib/builtins/int_lib.h

index 7f5eb79..7e1dabe 100644 (file)
@@ -48,7 +48,8 @@
 #define XSTR(a) STR(a)
 #define SYMBOL_NAME(name) XSTR(__USER_LABEL_PREFIX__) #name
 
-#if defined(__ELF__) || defined(__MINGW32__) || defined(__wasm__)
+#if defined(__ELF__) || defined(__MINGW32__) || defined(__wasm__) ||           \
+    defined(_AIX)
 #define COMPILER_RT_ALIAS(name, aliasname) \
   COMPILER_RT_ABI __typeof(name) aliasname __attribute__((__alias__(#name)));
 #elif defined(__APPLE__)