build: Disble fixed base for windows-on-arm

This commit is contained in:
kd-11 2024-09-08 00:45:39 +00:00 committed by kd-11
parent 4f27af9949
commit 31ce32709e
2 changed files with 6 additions and 3 deletions

View File

@ -1841,9 +1841,9 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp) noexcept
} }
#if defined(ARCH_X64) #if defined(ARCH_X64)
const exec_addr = pExp->ContextRecord->Rip; const auto exec_addr = pExp->ContextRecord->Rip;
#elif defined(ARCH_ARM64) #elif defined(ARCH_ARM64)
const exec_addr = pExp->ContextRecord->Pc; const auto exec_addr = pExp->ContextRecord->Pc;
#else #else
#error "Unimplemented exception handling for this architecture" #error "Unimplemented exception handling for this architecture"
#endif #endif

View File

@ -113,7 +113,10 @@ else()
# Increase stack limit to 8 MB # Increase stack limit to 8 MB
add_link_options(-Wl,--stack -Wl,8388608) add_link_options(-Wl,--stack -Wl,8388608)
add_link_options(-Wl,--image-base,0x10000) # For arm64 windows, the image base cannot be below 4GB or the OS rejects the binary without much explanation.
if(COMPILER_X86)
add_link_options(-Wl,--image-base,0x10000)
endif()
endif() endif()
# Specify C++ library to use as standard C++ when using clang # Specify C++ library to use as standard C++ when using clang