[Libreoffice-commits] core.git: Branch 'feature/wasm' - config_host.mk.in configure.ac solenv/gbuild
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 29 17:41:48 UTC 2021
config_host.mk.in | 1 +
configure.ac | 13 +++++++++++++
solenv/gbuild/gbuild.mk | 4 ++++
3 files changed, 18 insertions(+)
New commits:
commit a8c79eebcaba484dc2900988597f426abf18c156
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Thu Apr 29 19:40:14 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Apr 29 19:40:18 2021 +0200
Add --enable-wasm-strip
Will just set enable wasm strip for cross-target
Change-Id: I0840b843794e4fab694df26608619a7bf06f5e5f
diff --git a/config_host.mk.in b/config_host.mk.in
index 5cc02e393589..d45511061037 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -200,6 +200,7 @@ export ENABLE_SKIA=@ENABLE_SKIA@
export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@
export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@
export ENABLE_VALGRIND=@ENABLE_VALGRIND@
+export ENABLE_WASM_STRIP=@ENABLE_WASM_STRIP@
export ENABLE_WERROR=@ENABLE_WERROR@
export ENDIANNESS=@ENDIANNESS@
export EPM=@EPM@
diff --git a/configure.ac b/configure.ac
index 96fa11de367e..a7c82b3bca34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1894,6 +1894,12 @@ AC_ARG_ENABLE(curl,
[Disable CURL support.]),
,enable_curl=yes)
+AC_ARG_ENABLE(wasm-strip,
+ AS_HELP_STRING([--enable-wasm-strip],
+ [Strip the static build like for WASM/emscripten platform.]),
+,enable_wasm_strip=yes)
+
+
dnl ===================================================================
dnl Optional Packages (--with/without-)
dnl ===================================================================
@@ -3713,13 +3719,19 @@ if test "$_os" = "iOS" -o "$build_cpu" != "$host_cpu" -o -n "$DISABLE_DYNLOADING
cross_compiling="yes"
fi
fi
+
+ENABLE_WASM_STRIP=''
if test "$cross_compiling" = "yes"; then
export CROSS_COMPILING=TRUE
+ if test "$enable_dynamic_loading" != yes -a "$enable_wasm_strip" = yes; then
+ ENABLE_WASM_STRIP=TRUE
+ fi
else
CROSS_COMPILING=
BUILD_TYPE="$BUILD_TYPE NATIVE"
fi
AC_SUBST(CROSS_COMPILING)
+AC_SUBST(ENABLE_WASM_STRIP)
# Use -isystem (gcc) if possible, to avoid warnings in 3rd party headers.
# NOTE: must _not_ be used for bundled external libraries!
@@ -5298,6 +5310,7 @@ if test "$cross_compiling" = "yes"; then
test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
test "$with_galleries" = "no" -o -z "$WITH_GALLERY_BUILD" && sub_conf_opts="$sub_conf_opts --with-galleries=no"
+ test "$enable_wasm_strip" = "yes" && sub_conf_opts="$sub_conf_opts --enable-wasm-strip"
sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
# Don't bother having configure look for stuff not needed for the build platform anyway
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 1afa9e0451af..08c82f5e8d1f 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -220,6 +220,10 @@ gb_GLOBALDEFS := \
$(gb_COMPILERDEFS) \
$(gb_CPUDEFS) \
+ifeq ($(ENABLE_WASM_STRIP),TRUE)
+gb_GLOBALDEFS += -DENABLE_WASM_STRIP
+endif
+
ifeq ($(gb_ENABLE_DBGUTIL),$(true))
gb_GLOBALDEFS += -DDBG_UTIL
More information about the Libreoffice-commits
mailing list