[PATCH] D52597: [XRay] Add LD_LIBRARY_PATH to env variables for Unit Tests

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 11:09:27 PDT 2018


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: compiler-rt/lib/xray/tests/CMakeLists.txt:74
+  append_list_if(COMPILER_RT_HAS_LIBM -lm XRAY_UNITTEST_LINK_FLAGS)
+  append_list_if(COMPILER_RT_HAS_LIBRT -lrt XRAY_UNITTEST_LINK_FLAGS)
+  append_list_if(COMPILER_RT_HAS_LIBDL -ldl XRAY_UNITTEST_LINK_FLAGS)
----------------
dberris wrote:
> MaskRay wrote:
> > Does xray unittests call `clock_*` `timer_*` `mq_*` that are provided by librt?
> > http://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/librt.html
> > 
> > 
> Yes -- is that going to be a problem?
I have checked `librt`. `sanitizer_posix_libcdep.cc` used by xray calls `shm_open` and `shm_unlink` which require `librt.so`. The dependency is necessary.


https://reviews.llvm.org/D52597





More information about the llvm-commits mailing list