Skip to content

Commit 36f2065

Browse files
authored
[src, cuda] Pass both lib and lib64 to -L, linker will decide (#4296)
Not everyone had all CUDA libraries installed. The test for either .a or .so alone was not enough. ld will just ignore missing lib directories, pass both possible paths to it.
1 parent c2c5892 commit 36f2065

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/makefiles/cuda_64bit.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ CUDA_FLAGS = --compiler-options -fPIC --machine 64 -DHAVE_CUDA \
1313
-std=c++14 -DCUDA_API_PER_THREAD_DEFAULT_STREAM -lineinfo \
1414
--verbose -Wno-deprecated-gpu-targets
1515

16-
ifeq ($(shell test -e $(CUDATKDIR)/lib64/libcudart_static.a && echo -n yes),yes)
1716
CUDA_LDFLAGS += -L$(CUDATKDIR)/lib64 -Wl,-rpath,$(CUDATKDIR)/lib64
18-
else
1917
CUDA_LDFLAGS += -L$(CUDATKDIR)/lib -Wl,-rpath,$(CUDATKDIR)/lib
20-
endif
2118

2219
CUDA_LDLIBS += -lcublas -lcusparse -lcudart -lcurand -lcufft -lnvToolsExt #LDLIBS : The .so libs are loaded later than static libs in implicit rule

0 commit comments

Comments
 (0)