Skip to content
Snippets Groups Projects
Commit e35bb505 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: CUDA link options shopuld be added to NVCCLDFLAGS, not to NVCCFLAGS

parent 11d69616
No related branches found
No related tags found
1 merge request!34RF: New CUDACXXFLAGS
...@@ -65,6 +65,9 @@ ARCHLIBS = ...@@ -65,6 +65,9 @@ ARCHLIBS =
# armadillo structures may have different byte-alignment # armadillo structures may have different byte-alignment
# to equivalent g++-compiled structures (see # to equivalent g++-compiled structures (see
# include/armadillo_bits/compiler_setup.hpp) # include/armadillo_bits/compiler_setup.hpp)
#
# - Set -std=c++14. This is the newest C++ standard
# supported by nvcc for CUDA<11.0.
ARCHNVCCFLAGS = -DARMA_ALLOW_FAKE_GCC -std=c++14 ARCHNVCCFLAGS = -DARMA_ALLOW_FAKE_GCC -std=c++14
# Linker flags for CUDA projects. # Linker flags for CUDA projects.
...@@ -197,10 +200,10 @@ ifneq (${NVCC}, ) ...@@ -197,10 +200,10 @@ ifneq (${NVCC}, )
# cublas_Lt_static, in addition to culibos # cublas_Lt_static, in addition to culibos
ifeq ($(patsubst 9.%,,${CUDA_VER}),) ifeq ($(patsubst 9.%,,${CUDA_VER}),)
CUBLAS_STATIC = -lcublas_static -lculibos CUBLAS_STATIC = -lcublas_static -lculibos
NVCCFLAGS += --cudart=static NVCCLDFLAGS += --cudart=static
else else
CUBLAS_STATIC = -lcublas_static -lcublasLt_static -lculibos CUBLAS_STATIC = -lcublas_static -lcublasLt_static -lculibos
NVCCFLAGS += --cudart=static --cudadevrt=static NVCCLDFLAGS += --cudart=static --cudadevrt=static
endif endif
# Other CUDA toolkit components will # Other CUDA toolkit components will
...@@ -209,9 +212,9 @@ ifneq (${NVCC}, ) ...@@ -209,9 +212,9 @@ ifneq (${NVCC}, )
$(subst -lcurand,-lcurand_static,${CUDALIBS})) $(subst -lcurand,-lcurand_static,${CUDALIBS}))
else else
ifeq ($(patsubst 9.%,,${CUDA_VER}),) ifeq ($(patsubst 9.%,,${CUDA_VER}),)
NVCCFLAGS += --cudart=shared NVCLDCFLAGS += --cudart=shared
else else
NVCCFLAGS += --cudart=shared --cudadevrt=static NVCCLDFLAGS += --cudart=shared --cudadevrt=static
endif endif
_CUDALIBS += ${CUDALIBS} _CUDALIBS += ${CUDALIBS}
endif endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment