summaryrefslogtreecommitdiff
path: root/ffbuild
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2019-07-30 02:51:42 -0500
committerTimo Rothenpieler <timo@rothenpieler.org>2019-08-04 19:08:08 +0200
commit01994c93db43e50c01349203a76c0b7111d1d2f3 (patch)
tree341dfdb3daff9907d2d0c7087c4ba43ae7bbd9a2 /ffbuild
parentad97be9fa30d98c0946ee97ffbff3dfdb7831bf9 (diff)
downloadffmpeg-01994c93db43e50c01349203a76c0b7111d1d2f3.tar.gz
build: add support for building CUDA files with clang
This avoids using the CUDA SDK at all; instead, we provide a minimal reimplementation of the basic functionality that lavfi actually uses. It generates very similar code to what NVCC produces. The header contains no implementation code derived from the SDK. The function and type declarations are derived from the SDK only to the extent required to build a compatible implementation. This is generally accepted to qualify as fair use. Because this option does not require the proprietary SDK, it does not require the "--enable-nonfree" flag in configure. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'ffbuild')
-rw-r--r--ffbuild/common.mak3
1 files changed, 1 insertions, 2 deletions
diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index d2b33320c0..7355508ea0 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -38,7 +38,6 @@ OBJCCFLAGS = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS)
ASFLAGS := $(CPPFLAGS) $(ASFLAGS)
CXXFLAGS := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS)
X86ASMFLAGS += $(IFLAGS:%=%/) -I$(<D)/ -Pconfig.asm
-NVCCFLAGS += -ptx
HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS)
LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS)
@@ -91,7 +90,7 @@ COMPILE_NVCC = $(call COMPILE,NVCC)
%.h.c:
$(Q)echo '#include "$*.h"' >$@
-%.ptx: %.cu
+%.ptx: %.cu $(SRC_PATH)/compat/cuda/cuda_runtime.h
$(COMPILE_NVCC)
%.ptx.c: %.ptx