[compiler-rt][profile][AIX] pass extra link opts for test
authorDavid Tenty <daltenty@ibm.com>
Thu, 27 Jan 2022 03:14:19 +0000 (21:14 -0600)
committerDavid Tenty <daltenty@ibm.com>
Thu, 27 Jan 2022 21:25:19 +0000 (15:25 -0600)
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

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

index afd113c..477adcd 100644 (file)
@@ -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
index eb79b38..b4faa9f 100644 (file)
@@ -9,8 +9,8 @@ if root.host_os in ['Windows']:
   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', ''))