[compiler-rt] 492cbbc - [compiler-rt][profile][AIX] pass extra link opts for test

David Tenty via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 13:25:29 PST 2022


Author: David Tenty
Date: 2022-01-27T15:25:19-06:00
New Revision: 492cbbc36a8fcc4414e09950c2a09d701dbd3d0e

URL: https://github.com/llvm/llvm-project/commit/492cbbc36a8fcc4414e09950c2a09d701dbd3d0e
DIFF: https://github.com/llvm/llvm-project/commit/492cbbc36a8fcc4414e09950c2a09d701dbd3d0e.diff

LOG: [compiler-rt][profile][AIX] pass extra link opts for test

This is a follow up to D118101, that added bexpfull to the test on instrprof-get-filename-merge-mode.c AIX, in order to get the
necessary symbols exported. But unfortunately the extra dependent symbols this exports actually cause segfaults, which is why
this isn't really recommended in the first place, so just use an actual export list.

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

Added: 
    

Modified: 
    compiler-rt/test/profile/Posix/instrprof-get-filename-merge-mode.c
    compiler-rt/test/profile/Posix/lit.local.cfg.py

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/profile/Posix/instrprof-get-filename-merge-mode.c b/compiler-rt/test/profile/Posix/instrprof-get-filename-merge-mode.c
index afd113c5fa7c5..477adcd44e47d 100644
--- a/compiler-rt/test/profile/Posix/instrprof-get-filename-merge-mode.c
+++ b/compiler-rt/test/profile/Posix/instrprof-get-filename-merge-mode.c
@@ -1,5 +1,6 @@
 // Test __llvm_profile_get_filename when the on-line merging mode is enabled.
 //
+// RUN: echo get_filename_from_DSO > shr.exp
 // RUN: %clang_pgogen -fPIC -shared %shared_linker_xopts -o %t.dso %p/../Inputs/instrprof-get-filename-dso.c
 // RUN: %clang_pgogen -o %t %s %t.dso
 // RUN: env LLVM_PROFILE_FILE="%t-%m.profraw" %run %t

diff  --git a/compiler-rt/test/profile/Posix/lit.local.cfg.py b/compiler-rt/test/profile/Posix/lit.local.cfg.py
index eb79b385cc486..b4faa9f5052a0 100644
--- a/compiler-rt/test/profile/Posix/lit.local.cfg.py
+++ b/compiler-rt/test/profile/Posix/lit.local.cfg.py
@@ -9,8 +9,8 @@ def getRoot(config):
   config.unsupported = True
 
 # AIX usually usually makes use of an explicit export list when linking a shared
-# object, but for the purposes of these tests just export all symbols.
+# object, since the linker doesn't export anything by default.
 if root.host_os in ['AIX']:
-  config.substitutions.append(('%shared_linker_xopts', '-Wl,-bexpfull'))
+  config.substitutions.append(('%shared_linker_xopts', '-Wl,-bE:shr.exp'))
 else:
   config.substitutions.append(('%shared_linker_xopts', ''))


        


More information about the llvm-commits mailing list