This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by hubert.reinterpretcast on Feb 12 2019, 1:29 PM.

Details

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 12 2019, 1:29 PM
Herald added subscribers: Restricted Project, jdoerfert, delcypher and 2 others. · View Herald Transcript
tstellar added inline comments.Feb 12 2019, 1:50 PM
lib/xray/tests/CMakeLists.txt
83

Any idea why the xray tests need to manually specify the standard library like this instead of letting the compiler driver do it automatically?

hubert.reinterpretcast marked an inline comment as done.Feb 12 2019, 1:52 PM
hubert.reinterpretcast added inline comments.
lib/xray/tests/CMakeLists.txt
83

It uses the C compiler invocation for the linking, perhaps to avoid picking up the default C++ run-time libraries.

dberris accepted this revision.Feb 12 2019, 2:42 PM

LGTM

lib/xray/tests/CMakeLists.txt
83

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).

This revision is now accepted and ready to land.Feb 12 2019, 2:42 PM
This revision was automatically updated to reflect the committed changes.