diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2022-12-06 08:31:31 -0600 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2022-12-06 08:33:31 -0600 |
commit | fef73b81e9a742c4db61ded747c801e3717dae78 (patch) | |
tree | 19beb7ec32be0c2dc9cd1d3aab76839fe560dd29 /openmp/runtime/src/z_Linux_util.cpp | |
parent | d3628823c96f2d29ef8cea28f3b1b60ec670f318 (diff) | |
download | llvm-fef73b81e9a742c4db61ded747c801e3717dae78.zip llvm-fef73b81e9a742c4db61ded747c801e3717dae78.tar.gz llvm-fef73b81e9a742c4db61ded747c801e3717dae78.tar.bz2 |
[OpenMP][libomp] Cleanup version script and exported symbols
This patch fixes issues seen once https://reviews.llvm.org/D135402 is applied.
The exports_so.txt file attempts to export functions which may not exist
depending on which features are enabled/disabled in the OpenMP
runtime library. There are not many of these so exporting dummy
symbols is feasible.
* Export dummy __kmp_reset_stats() function when stats is disabled.
* Export dummy debugging data when USE_DEBUGGER is disabled
* Export dummy __kmp_itt_[fini|init]_ittlib() functions
when ITT Notify is disabled
* Export dummy __kmp_reap_monitor() function when KMP_USE_MONITOR
is disabled
* Remove __kmp_launch_monitor and __kmp_launch_worker from being exported.
They have been static symbols since library inception.
Fixes: https://github.com/llvm/llvm-project/issues/58858
Differential Revision: https://reviews.llvm.org/D138049
Diffstat (limited to 'openmp/runtime/src/z_Linux_util.cpp')
-rw-r--r-- | openmp/runtime/src/z_Linux_util.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp index 7aa704b..b1525a3 100644 --- a/openmp/runtime/src/z_Linux_util.cpp +++ b/openmp/runtime/src/z_Linux_util.cpp @@ -979,7 +979,7 @@ void __kmp_exit_thread(int exit_status) { #if KMP_USE_MONITOR void __kmp_resume_monitor(); -void __kmp_reap_monitor(kmp_info_t *th) { +extern "C" void __kmp_reap_monitor(kmp_info_t *th) { int status; void *exit_val; @@ -1021,6 +1021,12 @@ void __kmp_reap_monitor(kmp_info_t *th) { KMP_MB(); /* Flush all pending memory write invalidates. */ } +#else +// Empty symbol to export (see exports_so.txt) when +// monitor thread feature is disabled +extern "C" void __kmp_reap_monitor(kmp_info_t *th) { + (void)th; +} #endif // KMP_USE_MONITOR void __kmp_reap_worker(kmp_info_t *th) { |