Add build for linux-armv6 RID (#22)

Fixes https://github.com/mono/mono.posix/issues/20
This commit is contained in:
Alexander Köplinger 2022-07-15 20:42:57 +02:00 коммит произвёл GitHub
Родитель e9d4df70ce
Коммит 455170e76f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 36 добавлений и 0 удалений

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

@ -198,6 +198,7 @@ function __build_host()
build_common ${HOST_BUILD_NAME}-x64 -DTARGET_PLATFORM=host-${OS_LOWER}-x64 build_common ${HOST_BUILD_NAME}-x64 -DTARGET_PLATFORM=host-${OS_LOWER}-x64
build_common ${HOST_BUILD_NAME}-arm64 -DTARGET_PLATFORM=host-${OS_LOWER}-arm64 build_common ${HOST_BUILD_NAME}-arm64 -DTARGET_PLATFORM=host-${OS_LOWER}-arm64
build_common ${HOST_BUILD_NAME}-arm -DTARGET_PLATFORM=host-${OS_LOWER}-arm build_common ${HOST_BUILD_NAME}-arm -DTARGET_PLATFORM=host-${OS_LOWER}-arm
build_common ${HOST_BUILD_NAME}-armv6 -DTARGET_PLATFORM=host-${OS_LOWER}-armv6
fi fi
HOST_BUILT="yes" HOST_BUILT="yes"
@ -327,6 +328,7 @@ function __build_test()
i686) die 32-bit x86 Linux build not supported ;; i686) die 32-bit x86 Linux build not supported ;;
x86_64) arch="-x64" ;; x86_64) arch="-x64" ;;
armv7l) arch="-arm32" ;; armv7l) arch="-arm32" ;;
armv6l) arch="-armv6" ;;
arm64) arch="-arm64" ;; arm64) arch="-arm64" ;;
*) die "Unknown Linux host architecture: $(arch)" ;; *) die "Unknown Linux host architecture: $(arch)" ;;
esac esac

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

@ -47,6 +47,12 @@ stages:
archiveName: '$(LinuxHostArm32ArchiveName)' archiveName: '$(LinuxHostArm32ArchiveName)'
displayName: 'Archive Linux host ARM32 (Hard Float) build' displayName: 'Archive Linux host ARM32 (Hard Float) build'
- template: templates/pack-artifact.yaml
parameters:
buildDir: '$(LinuxHostArmv6BuildDir)'
archiveName: '$(LinuxHostArmv6ArchiveName)'
displayName: 'Archive Linux host ARMv6 build'
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Upload Artifacts displayName: Upload Artifacts
inputs: inputs:
@ -397,6 +403,13 @@ stages:
archiveName: '$(LinuxHostArm32ArchiveName)' archiveName: '$(LinuxHostArm32ArchiveName)'
destinationFolder: '$(LinuxHostArm32BuildDir)' destinationFolder: '$(LinuxHostArm32BuildDir)'
- template: /ci/templates/extract-artifact.yaml
parameters:
displayName: Extract Linux host ARMv6 build
artifactName: 'Host'
archiveName: '$(LinuxHostArmv6ArchiveName)'
destinationFolder: '$(LinuxHostArmv6BuildDir)'
- template: /ci/templates/extract-artifact.yaml - template: /ci/templates/extract-artifact.yaml
parameters: parameters:
displayName: Extract macOS arm64 host build displayName: Extract macOS arm64 host build

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

@ -58,6 +58,10 @@ variables:
value: $(LinuxHostBuildDirBase)-arm-release/lib value: $(LinuxHostBuildDirBase)-arm-release/lib
- name: LinuxHostArm32ArchiveName - name: LinuxHostArm32ArchiveName
value: $(LinuxHostArchiveNameBase)-arm value: $(LinuxHostArchiveNameBase)-arm
- name: LinuxHostArmv6BuildDir
value: $(LinuxHostBuildDirBase)-armv6-release/lib
- name: LinuxHostArmv6ArchiveName
value: $(LinuxHostArchiveNameBase)-armv6
# Android # Android
- name: AndroidArchiveNameBase - name: AndroidArchiveNameBase

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

@ -6,6 +6,9 @@ if(TARGET_PLATFORM MATCHES "^host-linux-.*")
elseif(TARGET_PLATFORM STREQUAL host-linux-arm) elseif(TARGET_PLATFORM STREQUAL host-linux-arm)
set(CMAKE_SYSTEM_PROCESSOR armv7l) set(CMAKE_SYSTEM_PROCESSOR armv7l)
set(TRIPLE "arm-linux-gnueabihf" CACHE STRING "" FORCE) set(TRIPLE "arm-linux-gnueabihf" CACHE STRING "" FORCE)
elseif(TARGET_PLATFORM STREQUAL host-linux-armv6)
set(CMAKE_SYSTEM_PROCESSOR armv6l)
set(TRIPLE "arm-linux-gnueabihf" CACHE STRING "" FORCE)
else() else()
set(IS_CROSS_BUILD False) set(IS_CROSS_BUILD False)
set(TRIPLE "" CACHE STRING "" FORCE) set(TRIPLE "" CACHE STRING "" FORCE)

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

@ -57,6 +57,16 @@
<HasSharedLibrary>true</HasSharedLibrary> <HasSharedLibrary>true</HasSharedLibrary>
</_NativeLib> </_NativeLib>
<_NativeLib Include="host-linux-armv6" Condition=" '$([MSBuild]::IsOSPlatform(Linux))' == 'true' or '$(PackageAllNativeLibs)' == 'true' ">
<RuntimeIdentifier>linux-armv6</RuntimeIdentifier>
<LibraryPrefix>$(_LinuxLibraryPrefix)</LibraryPrefix>
<SharedSuffix>$(_LinuxSharedNativeLibrarySuffix)</SharedSuffix>
<StaticSuffix>$(_LinuxStaticNativeLibrarySuffix)</StaticSuffix>
<DebugSuffix>$(_LinuxDebugNativeLibrarySuffix)</DebugSuffix>
<HasDebugLibrary>$(_LinuxHasDebugNativeLibrary)</HasDebugLibrary>
<HasSharedLibrary>true</HasSharedLibrary>
</_NativeLib>
<_NativeLib Include="host-darwin-x64" Condition=" '$([MSBuild]::IsOSPlatform(OSX))' == 'true' or '$(PackageAllNativeLibs)' == 'true' "> <_NativeLib Include="host-darwin-x64" Condition=" '$([MSBuild]::IsOSPlatform(OSX))' == 'true' or '$(PackageAllNativeLibs)' == 'true' ">
<RuntimeIdentifier>osx-x64</RuntimeIdentifier> <RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<LibraryPrefix>$(_DarwinLibraryPrefix)</LibraryPrefix> <LibraryPrefix>$(_DarwinLibraryPrefix)</LibraryPrefix>

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

@ -29,6 +29,10 @@
<DSOExtension>so</DSOExtension> <DSOExtension>so</DSOExtension>
<FolderName>%(Identity)</FolderName> <FolderName>%(Identity)</FolderName>
</_MonoUnixRuntimeId> </_MonoUnixRuntimeId>
<_MonoUnixRuntimeId Include="linux-armv6">
<DSOExtension>so</DSOExtension>
<FolderName>%(Identity)</FolderName>
</_MonoUnixRuntimeId>
<_MonoUnixRuntimeId Include="osx-arm64"> <_MonoUnixRuntimeId Include="osx-arm64">
<DSOExtension>dylib</DSOExtension> <DSOExtension>dylib</DSOExtension>
<FolderName>%(Identity)</FolderName> <FolderName>%(Identity)</FolderName>