summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLineDeviceComputer.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-10 18:34:33 (GMT)
committerBrad King <brad.king@kitware.com>2020-02-10 21:11:38 (GMT)
commite75632843480aefc303303b85350ecddcc57cc5e (patch)
treee7927962f08b2817b93a6bb945a8238acd0bdfef /Source/cmLinkLineDeviceComputer.cxx
parent44b8937b7614560d9e88d25456c8394b4b209d51 (diff)
downloadCMake-e75632843480aefc303303b85350ecddcc57cc5e.zip
CMake-e75632843480aefc303303b85350ecddcc57cc5e.tar.gz
CMake-e75632843480aefc303303b85350ecddcc57cc5e.tar.bz2
Propagate backtraces from LINK_LIBRARIES through to link line items
Since commit d4d0dd0f6a (cmLinkLineComputer: Add ComputeLinkLibs overload with backtraces, 2019-09-13, v3.16.0-rc1~87^2~4), backtraces have been collected by `ComputeLinkLibs` by looking back through the link implementation libraries for one matching the text of the link line item. This is slow in projects with long link lines. Instead, teach `cmComputeLinkDepends` and `cmComputeLinkInformation` to carry backtrace information explicitly along with the text of each item. Fixes: #20322
Diffstat (limited to 'Source/cmLinkLineDeviceComputer.cxx')
-rw-r--r--Source/cmLinkLineDeviceComputer.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index 847334b..65ed34c 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -115,18 +115,18 @@ void cmLinkLineDeviceComputer::ComputeLinkLibraries(
// These should be passed to nvlink. Other extensions need to be left
// out because nvlink may not understand or need them. Even though it
// can tolerate '.so' or '.dylib' it cannot tolerate '.so.1'.
- if (cmHasLiteralSuffix(item.Value, ".a") ||
- cmHasLiteralSuffix(item.Value, ".lib")) {
+ if (cmHasLiteralSuffix(item.Value.Value, ".a") ||
+ cmHasLiteralSuffix(item.Value.Value, ".lib")) {
linkLib.Value += this->ConvertToOutputFormat(
- this->ConvertToLinkReference(item.Value));
+ this->ConvertToLinkReference(item.Value.Value));
}
} else if (item.Value == "-framework") {
// This is the first part of '-framework Name' where the framework
// name is specified as a following item. Ignore both.
skipItemAfterFramework = true;
continue;
- } else if (cmLinkItemValidForDevice(item.Value)) {
- linkLib.Value += item.Value;
+ } else if (cmLinkItemValidForDevice(item.Value.Value)) {
+ linkLib.Value += item.Value.Value;
}
if (emitted.insert(linkLib.Value).second) {