diff options
author | moyo1997 <mookerem@Microsoft.com> | 2022-01-04 18:52:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-01-06 20:31:32 (GMT) |
commit | 26f52508f228702bb34d548d678ded3c6228936b (patch) | |
tree | 8fbbbb366a8c1ec2c4385d44f79f801ef7203660 /Modules/Platform/Windows-MSVC.cmake | |
parent | 0537be19fdbf5d0e67024699d21f3adbf7fa38a4 (diff) | |
download | CMake-26f52508f228702bb34d548d678ded3c6228936b.zip CMake-26f52508f228702bb34d548d678ded3c6228936b.tar.gz CMake-26f52508f228702bb34d548d678ded3c6228936b.tar.bz2 |
MSVC: update arm64ec default flags and lib
Update the support added by commit 4ea3a88625 (MSVC: Add support for
targeting ARM64EC, 2020-12-30, v3.20.0-rc1~121^2).
Add `softintrin.lib` to `CMAKE_C_STANDARD_LIBRARIES_INIT`.
Remove `/D_ARM64EC_WORKAROUND` from the flags as it was only ever needed
in preview versions of VS.
Issue: #21724
Diffstat (limited to 'Modules/Platform/Windows-MSVC.cmake')
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 7d602c3..2f53bc2 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -226,7 +226,7 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE) else() set(_PLATFORM_DEFINES "/DWIN32") if((_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM64EC") OR (_MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM64EC")) - set(_PLATFORM_DEFINES "${_PLATFORM_DEFINES} /D_AMD64_ /DAMD64 /D_ARM64EC_ /DARM64EC /D_ARM64EC_WORKAROUND_") + set(_PLATFORM_DEFINES "${_PLATFORM_DEFINES} /D_AMD64_ /DAMD64 /D_ARM64EC_ /DARM64EC") endif() if(_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM" OR _MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM") set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") @@ -246,6 +246,10 @@ else() set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib") endif() + if((_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM64EC") OR (_MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM64EC")) + string(APPEND CMAKE_C_STANDARD_LIBRARIES_INIT " softintrin.lib") + endif() + if(MSVC_VERSION LESS 1310) set(_FLAGS_C " /Zm1000${_FLAGS_C}") set(_FLAGS_CXX " /Zm1000${_FLAGS_CXX}") |