summaryrefslogtreecommitdiff
path: root/external/libwebp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-08 08:14:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-08 10:47:58 +0100
commit81b89ed0099696e881ef21f15d7f3a416d85cd8e (patch)
tree50753c1eee88f8e2152e6279d7035810e11396ef /external/libwebp
parentaea216e2527f37970654a7160eab57d097cbd0f5 (diff)
external/libwebp: Support clang-cl
...fixing > Makefile.vc(18) : fatal error U1050: Unable to auto-detect toolchain architecture! If cl.exe is in your PATH rerun nmake with ARCH=<arch>. because workdir/UnpackedTarball/libwebp/Makefile.vc naively relies on cl.exe- specific output details in > !IFNDEF ARCH > !IF ! [ $(CC) 2>&1 | grep -q "x86" > NUL ] > ARCH = x86 > !ELSE IF ! [ $(CC) 2>&1 | grep -q "x64" > NUL ] > ARCH = x64 > !ELSE IF ! [ $(CC) 2>&1 | grep -q "ARM" > NUL ] > ARCH = ARM > !ELSE > !ERROR Unable to auto-detect toolchain architecture! \ > If cl.exe is in your PATH rerun nmake with ARCH=<arch>. > !ENDIF > !ENDIF Change-Id: I376295fc75d6ab19773e53dbb607d3b156fbe948 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129655 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/libwebp')
-rw-r--r--external/libwebp/ExternalProject_libwebp.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/external/libwebp/ExternalProject_libwebp.mk b/external/libwebp/ExternalProject_libwebp.mk
index beb7a39e7b64..f62d4846d68e 100644
--- a/external/libwebp/ExternalProject_libwebp.mk
+++ b/external/libwebp/ExternalProject_libwebp.mk
@@ -16,10 +16,15 @@ $(eval $(call gb_ExternalProject_register_targets,libwebp,\
ifeq ($(COM),MSC)
$(eval $(call gb_ExternalProject_use_nmake,libwebp,build))
+# Explicitly passing in ARCH (for the known architectures, at least) avoids
+# workdir/UnpackedTarball/libwebp/Makefile.vc not being able to detect it when CC is clang-cl:
$(call gb_ExternalProject_get_state_target,libwebp,build):
$(call gb_Trace_StartRange,libwebp,EXTERNAL)
$(call gb_ExternalProject_run,build,\
nmake -nologo -f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output \
+ $(if $(filter INTEL,$(CPUNAME)),ARCH=x86, \
+ $(if $(filter X86_64,$(CPUNAME)),ARCH=x64, \
+ $(if $(filter AARCH64,$(CPUNAME)),ARCH=ARM))) \
)
$(call gb_Trace_EndRange,libwebp,EXTERNAL)
else