llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.82k stars 11.46k forks source link

MicroBenchmarks/XRay tests FAIL to link #64249

Open rorth opened 1 year ago

rorth commented 1 year ago

While building LLVM 17.0.0 rc1 on Solaris/amd64, two test-suite tests FAILed to link, breaking the test-suite build:

FAILED: MicroBenchmarks/XRay/ReturnReference/retref-bench
[...]
Undefined                       first referenced
 symbol                             in file
__xray_set_handler                  MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/retref-bench.cc.o
__xray_patch                        MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/retref-bench.cc.o
__xray_remove_handler               MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/retref-bench.cc.o
__xray_unpatch                      MicroBenchmarks/XRay/ReturnReference/CMakeFiles/retref-bench.dir/retref-bench.cc.o
ld: fatal: symbol referencing errors

FAILED: MicroBenchmarks/XRay/FDRMode/fdrmode-bench 
[...]
Undefined                       first referenced
 symbol                             in file
__xray_log_flushLog                 MicroBenchmarks/XRay/FDRMode/CMakeFiles/fdrmode-bench.dir/fdrmode-bench.cc.o
__xray_log_init_mode                MicroBenchmarks/XRay/FDRMode/CMakeFiles/fdrmode-bench.dir/fdrmode-bench.cc.o
__xray_patch                        MicroBenchmarks/XRay/FDRMode/CMakeFiles/fdrmode-bench.dir/fdrmode-bench.cc.o
__xray_remove_customevent_handler   MicroBenchmarks/XRay/FDRMode/CMakeFiles/fdrmode-bench.dir/fdrmode-bench.cc.o
__xray_unpatch                      MicroBenchmarks/XRay/FDRMode/CMakeFiles/fdrmode-bench.dir/fdrmode-bench.cc.o
__xray_log_finalize                 MicroBenchmarks/XRay/FDRMode/CMakeFiles/fdrmode-bench.dir/fdrmode-bench.cc.o
__xray_log_select_mode              MicroBenchmarks/XRay/FDRMode/CMakeFiles/fdrmode-bench.dir/fdrmode-bench.cc.o
ld: fatal: symbol referencing errors

This is a regression from LLVM 16 and caused by problems of the MicroBenchmarks/XRay/CMakeLists.txt XRay checks. The build log shows

-- Performing Test COMPILER_HAS_FXRAY_INSTRUMENT
-- Performing Test COMPILER_HAS_FXRAY_INSTRUMENT - Success
-- Looking for include file xray/xray_interface.h
-- Looking for include file xray/xray_interface.h - found
-- XRay tests enabled
rorth commented 7 months ago

Still happens in LLVM 18.1.0 rc2 on Solaris/amd64.