mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-28 01:49:23 -05:00
Merge topic 'cuda_device_linking_drop_dynamic_libs'
e8cc8d22d8Merge branch 'backport-cuda-filter-device-link-libs'3f5bfb425aCUDA: Filter out non-static libraries during device linking3c31ec7a0aCUDA: Filter out non-static libraries during device linking Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Arndt <daniel.arndt@iwr.uni-heidelberg.de> Merge-request: !2536
This commit is contained in:
@@ -77,15 +77,15 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries(
|
||||
|
||||
std::string out;
|
||||
if (item.IsPath) {
|
||||
// nvcc understands absolute paths to libraries ending in '.a' should
|
||||
// be passed to nvlink. Other extensions like '.so' or '.dylib' are
|
||||
// rejected by the nvcc front-end even though nvlink knows to ignore
|
||||
// them. Bypass the front-end via '-Xnvlink'.
|
||||
if (!cmHasLiteralSuffix(item.Value, ".a")) {
|
||||
out += "-Xnvlink ";
|
||||
// nvcc understands absolute paths to libraries ending in '.a' or '.lib'.
|
||||
// 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")) {
|
||||
out += this->ConvertToOutputFormat(
|
||||
this->ConvertToLinkReference(item.Value));
|
||||
}
|
||||
out +=
|
||||
this->ConvertToOutputFormat(this->ConvertToLinkReference(item.Value));
|
||||
} else if (cmLinkItemValidForDevice(item.Value)) {
|
||||
out += item.Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user