CMake updated to build ARM64EC (#144)

This commit is contained in:
Chuck Walbourn 2024-07-18 15:28:55 -07:00 коммит произвёл GitHub
Родитель aecc395fe7
Коммит afe8ba249a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 97 добавлений и 4 удалений

Просмотреть файл

@ -38,6 +38,15 @@
"cacheVariables": { "DIRECTX_ARCH": "arm64" }, "cacheVariables": { "DIRECTX_ARCH": "arm64" },
"hidden": true "hidden": true
}, },
{
"name": "ARM64EC",
"architecture": {
"value": "arm64ec",
"strategy": "external"
},
"cacheVariables": { "DIRECTX_ARCH": "arm64ec" },
"hidden": true
},
{ {
"name": "Debug", "name": "Debug",
@ -180,6 +189,8 @@
{ "name": "x86-Release" , "description": "MSVC for x86 (Release) with DX12", "inherits": [ "base", "x86", "Release", "MSVC" ] }, { "name": "x86-Release" , "description": "MSVC for x86 (Release) with DX12", "inherits": [ "base", "x86", "Release", "MSVC" ] },
{ "name": "arm64-Debug" , "description": "MSVC for ARM64 (Debug) with DX12", "inherits": [ "base", "ARM64", "Debug", "MSVC" ] }, { "name": "arm64-Debug" , "description": "MSVC for ARM64 (Debug) with DX12", "inherits": [ "base", "ARM64", "Debug", "MSVC" ] },
{ "name": "arm64-Release", "description": "MSVC for ARM64 (Release) with DX12", "inherits": [ "base", "ARM64", "Release", "MSVC" ] }, { "name": "arm64-Release", "description": "MSVC for ARM64 (Release) with DX12", "inherits": [ "base", "ARM64", "Release", "MSVC" ] },
{ "name": "arm64ec-Debug" , "description": "MSVC for ARM64EC (Debug) with DX12", "inherits": [ "base", "ARM64EC", "Debug", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } },
{ "name": "arm64ec-Release", "description": "MSVC for ARM64EC (Release) with DX12", "inherits": [ "base", "ARM64EC", "Release", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } },
{ "name": "x64-Debug-UWP" , "description": "MSVC for x64 (Debug) for UWP", "inherits": [ "base", "x64", "Debug", "MSVC", "UWP" ] }, { "name": "x64-Debug-UWP" , "description": "MSVC for x64 (Debug) for UWP", "inherits": [ "base", "x64", "Debug", "MSVC", "UWP" ] },
{ "name": "x64-Release-UWP" , "description": "MSVC for x64 (Release) for UWP", "inherits": [ "base", "x64", "Release", "MSVC", "UWP" ] }, { "name": "x64-Release-UWP" , "description": "MSVC for x64 (Release) for UWP", "inherits": [ "base", "x64", "Release", "MSVC", "UWP" ] },

Просмотреть файл

@ -152,9 +152,11 @@ jobs:
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
- job: CMAKE_BUILD - job: CMAKE_BUILD_X64
displayName: 'CMake BUILD_TESTING=ON' displayName: 'CMake for X64 BUILD_TESTING=ON'
timeoutInMinutes: 60 timeoutInMinutes: 60
workspace:
clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
@ -236,16 +238,70 @@ jobs:
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Release-Clang -v cmakeArgs: --build out/build/x64-Release-Clang -v
- job: CMAKE_BUILD_ARM64
displayName: 'CMake for ARM64 BUILD_TESTING=ON'
timeoutInMinutes: 60
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchTags: false
- task: DeleteFiles@1 - task: DeleteFiles@1
displayName: Delete files from Tests
inputs: inputs:
Contents: 'out' SourceFolder: Tests
Contents: '**'
RemoveSourceFolder: true
RemoveDotFiles: true
- task: CmdLine@2 - task: CmdLine@2
displayName: Switch compiler to ARM64 displayName: Fetch Tests
inputs:
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmeshtest.git Tests
workingDirectory: $(Build.SourcesDirectory)
failOnStderr: true
- task: CmdLine@2
displayName: Setup environment for CMake to use VS
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvarsamd64_arm64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvarsamd64_arm64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\arm64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1
displayName: CMake (MSVC; arm64-Debug) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Debug
- task: CMake@1
displayName: CMake (MSVC; arm64-Debug) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Debug -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (MSVC; arm64-Release) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Release
- task: CMake@1
displayName: CMake (MSVC; arm64-Release) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Release -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; arm64-Debug) Config displayName: CMake (clang/LLVM; arm64-Debug) Config
inputs: inputs:
@ -269,3 +325,29 @@ jobs:
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Release-Clang -v cmakeArgs: --build out/build/arm64-Release-Clang -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Debug) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64ec-Debug
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Debug) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64ec-Debug -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Release) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64ec-Release
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Release) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64ec-Release -v