summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2020-03-10 18:00:36 -0400
committerBradley Sepos <[email protected]>2020-03-10 18:00:36 -0400
commit6a133e58c38a929b62227e4a428c4965a14f7fec (patch)
tree9ef80b59495743701151f347c03b4f70544d9554 /contrib
parentf77ca8d18483bda905d28c5c76cf9468cb10d78d (diff)
contrib: Add debug and size optimization support to libdav1d.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libdav1d/module.defs14
1 files changed, 13 insertions, 1 deletions
diff --git a/contrib/libdav1d/module.defs b/contrib/libdav1d/module.defs
index 9903fa2d6..1a46badc8 100644
--- a/contrib/libdav1d/module.defs
+++ b/contrib/libdav1d/module.defs
@@ -13,10 +13,22 @@ LIBDAV1D.CONFIGURE.shared =
LIBDAV1D.CONFIGURE.host =
LIBDAV1D.CONFIGURE.build =
LIBDAV1D.CONFIGURE.static = -Ddefault_library=static
-LIBDAV1D.CONFIGURE.extra = --libdir=$(call fn.ABSOLUTE,$(CONTRIB.build/))lib/ --buildtype=release \
+LIBDAV1D.CONFIGURE.extra = --libdir=$(call fn.ABSOLUTE,$(CONTRIB.build/))lib/ \
-Denable_tools=false -Denable_tests=false
LIBDAV1D.CONFIGURE.env =
+ifneq (none,$(LIBDAV1D.GCC.g))
+ LIBDAV1D.CONFIGURE.extra += --buildtype=debug
+ ifeq (none,$(LIBDAV1D.GCC.O))
+ LIBDAV1D.CONFIGURE.extra += --optimization=g
+ endif
+else
+ LIBDAV1D.CONFIGURE.extra += --buildtype=release
+ ifneq (,$(filter $(LIBDAV1D.GCC.O),size size-aggressive))
+ LIBDAV1D.CONFIGURE.extra += --optimization=s
+ endif
+endif
+
ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
LIBDAV1D.CONFIGURE.extra += --cross-file=$(call fn.ABSOLUTE,$(LIBDAV1D.EXTRACT.dir/))x86_64-w64-mingw32.meson
endif