hpcrun: Add build option to --disable-auditor by default

Some systems still have versions of Glibc that fail hard with LD_AUDIT. In these scenarios it makes sense for --disable-auditor to be the default, rather than --enable-auditor. This commit adds an option to meson setup to decide which should be the default at configuration time.

This makes working around issues like #899 a little easier, e.g. for tutorials/workshops.

To Demonstrate

$ hpcrun --enable-auditor printenv LD_AUDIT LD_PRELOAD
libhpcrun_audit.so
libhpcrun_preload.so

$ hpcrun --disable-auditor printenv LD_AUDIT LD_PRELOAD
libhpcrun_preload_libdl.so:libhpcrun_preload.so

$ # With -Dhpcrun_auditor_by_default=true (the default)
$ hpcrun printenv LD_AUDIT LD_PRELOAD
libhpcrun_audit.so
libhpcrun_preload.so

$ # With -Dhpcrun_auditor_by_default=false
$ hpcrun printenv LD_AUDIT LD_PRELOAD
libhpcrun_preload_libdl.so:libhpcrun_preload.so

Backward Compatibility

Previously --disable-auditor was the default on ARM systems, due to the prevalence of older Glibc across our user base. With this MR --enable-auditor is the default everywhere, including on ARM systems, unless -Dhpcrun_use_auditor_by_default=false is passed to meson setup/configure.

Edited by Jonathon Anderson

Merge request reports

Loading