| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Due to an oversight in cmLinkLineDeviceComputer object
files did not get propagate to the device linking phase
when given via the `$<TARGET_OBJECTS>` generator expression.
|
|
|
|
|
|
|
|
| |
After b665966933 (cmComputeLinkInformation: track `OBJECT` library
dependencies, 2023-07-22), introduced in !8645 as a fix for #25112,
`OBJECT` libraries were tracked in a separate member to reduce the risk
of further regressions. This commit prepares consumers to handle
`OBJECT` libraries once they start appearing as link items.
|
|
|
|
| |
Fixes #22200
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We evaluate `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` for two purposes:
* Constructing the link line.
* Collecting usage requirements.
We evaluate `INTERFACE_LINK_LIBRARIES` separately for each purpose in
order to support the `$<LINK_ONLY:...>` generator expression used to
express private link dependencies of a static library. Previously we
only evaluated `LINK_LIBRARIES` for linking, and used that result for
collecting usage requirements too. Therefore `$<LINK_ONLY:...>` does
not work in `LINK_LIBRARIES`.
With the introduction of `INTERFACE_LINK_LIBRARIES_DIRECT`, evaluation
of `LINK_LIBRARIES` now needs to distinguish these two cases in order to
honor link dependencies encountered through `$<LINK_ONLY:...>` without
also exposing other usage requirements through private dependencies of a
static library. Revise internal infrastructure to distinguish the two
cases when evaluating `LINK_LIBRARIES`. Make the information available
in code paths for `INTERFACE_LINK_LIBRARIES_DIRECT` and `LINK_ONLY`.
Defer actually using the information to later commits.
Issue: #22496
|
|
|
|
|
|
|
|
| |
This generator expression offers the capability, for the link step, to
decorate libraries with prefix/suffix flags and/or adding any specific flag for each
library.
Fixes: #22812, #18751, #20078, #22703
|
| |
|
|
|
|
| |
Use an enum to avoid implicit conversions to bool.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When CUDA is enabled, and a pure non-CUDA target has
CMAKE_CUDA_SEPARABLE_COMPILATION enabled, don't actually perform
the device linking step, as it will fail. A target that has
CMAKE_CUDA_SEPARABLE_COMPILATION enabled must also have CUDA
usage (either itself, or something it links to).
Fixes: #20182
|
| |\
| | |
| | |
| | | |
Merge-request: !3526
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously the CMake didn't compute the required set of libraries
needed to properly device link a static library when
CUDA_RESOLVE_DEVICE_SYMBOLS was enabled.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
2dfc52675c cmAlgorithms: Add cmContains
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@web.de>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !3700
|
| | | |
| | | |
| | | |
| | | | |
Also, use the new function where applicable.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This replaces invocations of
- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This adds the `cmStringAlgorithms.h` header and moves all string functions
from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
8895449648 CUDA: Restore device linking to imported static library targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3526
|
| |
| |
| |
| |
| |
| |
| | |
This ability was lost in commit 81b4d10d8f (CUDA: More exhaustive checks
to determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2)
and needs to be restored to use imported static libraries that have CUDA
symbols.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Checks added in commit 81b4d10d8f (CUDA: More exhaustive checks to
determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2)
assumed that CUDA properties would be set only if CUDA is enabled.
We cannot do a device link step if we do not have the CUDA language
enabled. This was discovered as some projects unconditionally set CUDA
properties such as `CUDA_RESOLVE_DEVICE_SYMBOLS` even when the CUDA
language has not been enabled.
Fixes: #19432
|
|
|
|
|
|
|
|
|
| |
Previously CMake used fairly naive logic to determine when to do
device linking which caused unnecessary device linking to occur
frequently. We now use a more exhaustive algorithm to determine
when we have a need for device linking.
Fixes: #19238
|
| |
|
|
|
|
|
|
|
|
|
| |
The filter in commit e768d96c74 (CUDA: Filter out host link flags during
device linking, 2018-10-22, v3.13.0-rc2~4^2~2^2) removes `-framework`
but not the framework name that comes after it. Revise the logic to
remove both.
Fixes: #18911
|
|
|
|
|
|
| |
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit v3.12.0-rc1~278^2 (CUDA: Pass more link libraries to device
linking, 2018-03-27) we consider every link library during device
linking and use `-Xnvlink` to pass those that do not end in `.a`.
However, nvlink breaks on versioned shared library names such as
`.so.1`. Work around this problem by not passing library paths that do
not end in `.a` or `.lib`. nvlink would not find device symbols in them
anyway.
Fixes: #18504
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit v3.12.0-rc1~278^2 (CUDA: Pass more link libraries to device
linking, 2018-03-27) we consider every link item during device linking.
However, items that start in `-` may be host-specific link flags that
nvcc will not understand during device linking. Filter such items using
a white list.
In particular, this allows `-pthread` to be used for host linking while
not polluting the device link line.
Issue: #18008
|
|/
|
|
|
|
|
|
| |
The nvcc device linker is designed so that each static library
with device symbols only needs to be listed once as it doesn't
care about link order. If you provide the same static library
multiple times it will error out. To make sure this occurs
we find the unique set of link items.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we dropped non-target items from the device link line because
nvcc rejects paths to shared library files, and only with target items
do we know the kind of library. However, this also prevents projects
from linking to system-provided libraries like `cublas_device` that
contain device code.
Fix this by passing more link items to device linking. Items that are
not file paths, such as `-lfoo`, can simply be passed unconditionally.
Items that are targets known to be shared libraries can still be
skipped. Items that are paths to library files can be passed directly
if they end in `.a`. Otherwise, pass them using `-Xnvlink` to bypass
nvcc's front-end. The nvlink tool knows to ignore shared library files.
Issue: #16317
|
|
|
|
|
|
| |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
| |
|
|
|
|
|
|
|
| |
If a static library has the property CUDA_RESOLVE_DEVICE_SYMBOLS enabled
it will now perform the device link step. The normal behavior is
to delay calling device link until the static library is consumed by
a shared library or an executable.
|
| |
|
|
|
|
|
|
|
|
| |
Previously we had a two issues when building cuda executables
that required separable compilation. The first was that we didn't
propagate FLAGS causing any -arch / -gencode flags to be dropped, and
secondly generators such as ninja would use the CXX language flags
instead of CUDA when the executable was mixed language.
|
|
|