configure.ac |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit ffa4db09cbc3a189d68b8592eea204ea79b017dd
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Fri Mar 14 01:26:32 2025 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Mar 20 10:23:09 2025 +0100

    use clang with --target switch on windows (enable skia for arm64)
    
    This is a 25-2 version of the commit that fixes the native
    compilation of arm64 of pdfium after
    6007fbef5c2e4a0b80a4c0031ff36117aa41e63f (update to pdfium 7012
    that switched to using clang) and allows to enable skia
    
    While on the branch pdfium is unaffected since it still using
    msvc compiler, skia not using the target switch would result
    compiling the wrong architecture. So fixing that fundamental problem
    allows to enable skia for windows aarch64
    
    Change-Id: I1cee8c7b84c1988f7a5800da913c299d14444e4c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182889
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 8c2605aea05c6c5b9883400e1c1b7944f4edbc47)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182997

diff --git a/configure.ac b/configure.ac
index e443a819101c..5682b6240a07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1017,7 +1017,7 @@ cygwin*|wsl*)
     LINKFLAGSNOUNDEFS=
 
     if test "$host_cpu" = "aarch64"; then
-        build_skia=no
+        build_skia=yes
         enable_gpgmepp=no
         enable_coinmp=no
         enable_firebird_sdbc=no
@@ -4141,6 +4141,7 @@ cygwin*|wsl*)
         WIN_HOST_ARCH="x64"
         WIN_MULTI_ARCH="x86"
         WIN_HOST_BITS=64
+        WIN_CLANG_TARGET="x86_64-pc-windows-msvc"
         ;;
     i*86)
         CPUNAME=INTEL
@@ -4149,6 +4150,7 @@ cygwin*|wsl*)
         WIN_HOST_ARCH="x86"
         WIN_HOST_BITS=32
         WIN_OTHER_ARCH="x64"
+        WIN_CLANG_TARGET="i686-pc-windows-msvc"
         ;;
     aarch64)
         CPUNAME=AARCH64
@@ -4159,6 +4161,7 @@ cygwin*|wsl*)
         WIN_HOST_ARCH="arm64"
         WIN_HOST_BITS=64
         with_ucrt_dir=no
+        WIN_CLANG_TARGET="arm64-pc-windows-msvc"
         ;;
     *)
         AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
@@ -12848,7 +12851,7 @@ if test "$ENABLE_SKIA" = TRUE -a "$COM_IS_CLANG" != 
TRUE; then
             fi
             if test -n "$LO_CLANG_CC"; then
                 dnl explicitly set -m32/-m64
-                LO_CLANG_CC="$LO_CLANG_CC -m$WIN_HOST_BITS"
+                LO_CLANG_CC="$LO_CLANG_CC --target=$WIN_CLANG_TARGET 
-m$WIN_HOST_BITS"
                 LO_CLANG_CXX="$LO_CLANG_CC"
                 AC_MSG_RESULT([$LO_CLANG_CC])
             else

Reply via email to