summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLineDeviceComputer.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* CUDA: Filter out non-static libraries during device linkingRobert Maynard2018-10-291-8/+8
| | | | | | | | | | | | 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
* Merge branch 'cuda-filter-device-link-items' into cuda-thread-flagsBrad King2018-10-241-1/+18
|\
| * CUDA: Filter out host link flags during device linkingRobert Maynard2018-10-241-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | CUDA: Properly de-duplicate libs when doing device linkingRobert Maynard2018-07-171-5/+17
|/ | | | | | | | 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.
* CUDA: Pass more link libraries to device linkingRobert Maynard2018-03-281-30/+24
| | | | | | | | | | | | | | | | | 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
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-10/+8
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-3/+2
|
* CUDA: Static libraries can now explicitly resolve device symbolsRobert Maynard2017-04-261-3/+18
| | | | | | | 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.
* fix some include-what-you-use diagnosticsDaniel Pfeifer2017-02-171-1/+9
|
* CUDA: Now pass correct FLAGS when device link cuda executables.Robert Maynard2017-01-121-0/+6
| | | | | | | | 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.
* CUDA: Add LinkLineComputer that computes cuda dlink lines.Robert Maynard2016-11-141-0/+74