[PATCH] D58144: [xray][tests][RHDTS] Add -lstdc++ after LLVM libs, resolving link error with RHDTS

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 12 14:42:47 PST 2019


dberris accepted this revision.
dberris added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/xray/tests/CMakeLists.txt:83
 
+list(APPEND XRAY_UNITTEST_LINK_FLAGS -l${SANITIZER_CXX_ABI_LIBRARY})
+
----------------
hubert.reinterpretcast wrote:
> tstellar wrote:
> > Any idea why the xray tests need to manually specify the standard library like this instead of letting the compiler driver do it automatically?
> It uses the C compiler invocation for the linking, perhaps to avoid picking up the default C++ run-time libraries.
That's a good question @tstellar -- a lot of this is cargo-cult copy-pasted from other sanitizer tests. The reason I think is because there are sanitized builds of the standard library (libc++ at least) and this allows us to pick those as well (say if we're building an address-sanitized XRay implementation).


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58144/new/

https://reviews.llvm.org/D58144





More information about the llvm-commits mailing list