Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/nccl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Luehr <nluehr@nvidia.com>2016-04-20 00:51:03 +0300
committerNathan Luehr <nluehr@nvidia.com>2016-04-20 00:51:03 +0300
commit03df4c77594bb37ab39323412b98123ddada1804 (patch)
tree0835d6f57b1b18ef740ff12ad55fdf6676f6aca5 /Makefile
parent0d4f8f4e95a3d875aae5f0ed287be12f4ecb3535 (diff)
Moved no-as-needed flag to link rule.
Avoids link errors for tests linked with nvcc.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7779120..dee3f80 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ NVCUFLAGS += -Xptxas -v -Xcompiler -Wall,-Wextra
CXXFLAGS += -Wall -Wextra
endif
-LDFLAGS := -Wl,--no-as-needed -L$(CUDA_HOME)/lib64 -lcudart
+LDFLAGS := -L$(CUDA_HOME)/lib64 -lcudart
MPIFLAGS := -I$(MPI_HOME)/include -L$(MPI_HOME)/lib -lmpi
TSTINC := -Ibuild/include -Itest/include
@@ -88,7 +88,7 @@ lib : $(INCTARGETS) $(LIBDIR)/$(LIBTARGET)
$(LIBDIR)/$(LIBTARGET) : $(LIBOBJ)
@printf "Linking %-25s\n" $@
@mkdir -p $(LIBDIR)
- @$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(LIBSONAME) -o $@ $(LDFLAGS) $(LIBOBJ)
+ @$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,--no-as-needed -Wl,-soname,$(LIBSONAME) -o $@ $(LDFLAGS) $(LIBOBJ)
@ln -sf $(LIBSONAME) $(LIBDIR)/$(LIBNAME)
@ln -sf $(LIBTARGET) $(LIBDIR)/$(LIBSONAME)