A link error was encountered when using the Red Hat Developer Toolset. In the RHDTS, libstdc++.so is a linker script that may resolve symbols to a static library. This patch places -lstdc++ later in the ordering.
Details
- Reviewers
sfertile nemanjai tstellar dberris - Commits
- rG0e657d457626: Merging r353905:
rL362765: Merging r353905:
rGa9f91c810c84: [xray][tests][RHDTS] Add -lstdc++ after LLVM libs, resolving link error with…
rL353905: [xray][tests][RHDTS] Add -lstdc++ after LLVM libs, resolving link error with…
rCRT353905: [xray][tests][RHDTS] Add -lstdc++ after LLVM libs, resolving link error with…
Diff Detail
- Repository
- rCRT Compiler Runtime
Event Timeline
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? |
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. |
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). |
Any idea why the xray tests need to manually specify the standard library like this instead of letting the compiler driver do it automatically?