experimental aarch64 builds

Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2025-05-21 21:37:32 -04:00 committed by crueter
parent a538126eb7
commit 2de0f4eef7
6 changed files with 219 additions and 146 deletions

View file

@ -0,0 +1,34 @@
@echo off
set chain=%1
set qt_dir=%2
set qt_host=%3
set ffmpeg_dir=%4
if not defined DevEnvDir (
CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain%
)
CALL mkdir build
@REM TODO: enable QtWebEngine and translations, awaiting Qt builds
CALL cmake -S . -B build\%chain% ^
-DCMAKE_BUILD_TYPE=Release ^
-DENABLE_QT_TRANSLATION=OFF ^
-DUSE_DISCORD_PRESENCE=ON ^
-DYUZU_USE_BUNDLED_QT=OFF ^
-DYUZU_USE_QT_MULTIMEDIA=ON ^
-DYUZU_USE_QT_WEB_ENGINE=OFF ^
-DYUZU_USE_BUNDLED_VCPKG=ON ^
-DYUZU_USE_BUNDLED_SDL2=OFF ^
-DYUZU_USE_EXTERNAL_SDL2=ON ^
-DFFmpeg_PATH=%ffmpeg_dir% ^
-DYUZU_ENABLE_LTO=ON ^
-G "Ninja" ^
-DYUZU_TESTS=OFF ^
-DQt6_DIR=%qt_dir% ^
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ^
-DQT_TARGET_PATH=%qt_dir% ^
-DQT_HOST_PATH=%qt_host%
CALL cmake --build build\%chain%

View file

@ -0,0 +1,29 @@
HOST_DIR=$1
QT_DIR=$2
cd eden-windows-msvc
cp "/c/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/arm64/dxcompiler.dll" .
for i in `$HOST_DIR/bin/windeployqt.exe ./eden.exe --no-plugins --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 1 --dry-run | grep "Updating .*dll" | cut -d" " -f2 | cut -d"." -f1-2`
do
cp $QT_DIR/bin/$i .
done
PLUGIN_DIRS=`$HOST_DIR/bin/windeployqt.exe ./eden.exe --no-libraries --plugindir plugins --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 1 --dry-run | grep "Creating directory" | cut -d" " -f3 | cut -d"." -f1`
for i in $PLUGIN_DIRS
do
mkdir -p $i
done
for i in `$HOST_DIR/bin/windeployqt.exe ./eden.exe --no-libraries --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --list source --dry-run`
do
PLUGIN=$(cut -d "\\" -f5- <<< $i)
cp $QT_DIR/$PLUGIN ./$PLUGIN
done
## Zip
cd ..
GITDATE=$(git show -s --date=short --format='%ad' | tr -d "-")
GITREV=$(git show -s --format='%h')
BUILD_ZIP="eden-windows-msvc-$GITDATE-$GITREV-aarch64.zip"
7z a -tzip artifacts/$BUILD_ZIP eden-windows-msvc/*

View file

@ -33,9 +33,9 @@ endif()
option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2;NOT MSVC" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2" OFF)
else()
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT YUZU_USE_BUNDLED_SDL2" OFF)
endif()
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
@ -462,7 +462,7 @@ if (ENABLE_QT)
if (NOT Qt6_DIR)
set(Qt6_DIR "" CACHE PATH "Additional path to search for Qt6 libraries like C:/Qt/6.8.3/msvc2022_64/lib/cmake/Qt6")
endif()
list(APPEND CMAKE_PREFIX_PATH "${Qt6_DIR}")
list(PREPEND CMAKE_PREFIX_PATH "${Qt6_DIR}")
endif()
# QT6 Multimedia pulls in unneeded audio systems (ALSA, Pulseaudio) for FreeBSD

View file

@ -256,8 +256,11 @@ elseif(ANDROID)
elseif(WIN32)
# Use yuzu FFmpeg binaries
set(FFmpeg_EXT_NAME "ffmpeg-7.1.1")
set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}")
if (ARCHITECTURE_x86_64)
download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "")
set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}")
endif()
set(FFmpeg_FOUND YES)
set(FFmpeg_INCLUDE_DIR "${FFmpeg_PATH}/include" CACHE PATH "Path to FFmpeg headers" FORCE)
set(FFmpeg_LIBRARY_DIR "${FFmpeg_PATH}/bin" CACHE PATH "Path to FFmpeg library directory" FORCE)

View file

@ -58,6 +58,8 @@ CallbackOrAccessOneWord DynarmicCP15::CompileSendOneWord(bool two, unsigned opc1
_mm_lfence();
#elif defined(ARCHITECTURE_x86_64)
asm volatile("mfence\n\tlfence\n\t" : : : "memory");
#elif defined(_MSC_VER) && defined(ARCHITECTURE_arm64)
_Memory_barrier();
#elif defined(ARCHITECTURE_arm64)
asm volatile("dsb sy\n\t" : : : "memory");
#else
@ -75,6 +77,8 @@ CallbackOrAccessOneWord DynarmicCP15::CompileSendOneWord(bool two, unsigned opc1
_mm_mfence();
#elif defined(ARCHITECTURE_x86_64)
asm volatile("mfence\n\t" : : : "memory");
#elif defined(_MSC_VER) && defined(ARCHITECTURE_arm64)
_Memory_barrier();
#elif defined(ARCHITECTURE_arm64)
asm volatile("dmb sy\n\t" : : : "memory");
#else

View file

@ -458,6 +458,7 @@ endif()
if (WIN32 AND NOT YUZU_USE_BUNDLED_QT AND QT_VERSION VERSION_GREATER_EQUAL 6)
set(YUZU_EXE_DIR "$<TARGET_FILE_DIR:yuzu>")
message(STATUS "WINDEPLOYQT EXECUTABLE: ${WINDEPLOYQT_EXECUTABLE}")
add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/eden.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0)
endif()
@ -473,10 +474,12 @@ endif()
if (MSVC)
include(CopyYuzuSDLDeps)
include(CopyYuzuFFmpegDeps)
copy_yuzu_SDL_deps(yuzu)
if (ARCHITECTURE_x86_64)
include(CopyYuzuFFmpegDeps)
copy_yuzu_FFmpeg_deps(yuzu)
endif()
endif()
if (NOT APPLE AND ENABLE_OPENGL)
target_compile_definitions(yuzu PRIVATE HAS_OPENGL)