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}-arm64 -DTARGET_PLATFORM=host-${OS_LOWER}-arm64
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
HOST_BUILT="yes"
@ -327,6 +328,7 @@ function __build_test()
i686) die 32-bit x86 Linux build not supported ;;
x86_64) arch="-x64" ;;
armv7l) arch="-arm32" ;;
armv6l) arch="-armv6" ;;
arm64) arch="-arm64" ;;
*) die "Unknown Linux host architecture: $(arch)" ;;
esac

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

@ -47,6 +47,12 @@ stages:
archiveName: '$(LinuxHostArm32ArchiveName)'
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
displayName: Upload Artifacts
inputs:
@ -397,6 +403,13 @@ stages:
archiveName: '$(LinuxHostArm32ArchiveName)'
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
parameters:
displayName: Extract macOS arm64 host build

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

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

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

@ -6,6 +6,9 @@ if(TARGET_PLATFORM MATCHES "^host-linux-.*")
elseif(TARGET_PLATFORM STREQUAL host-linux-arm)
set(CMAKE_SYSTEM_PROCESSOR armv7l)
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()
set(IS_CROSS_BUILD False)
set(TRIPLE "" CACHE STRING "" FORCE)

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

@ -57,6 +57,16 @@
<HasSharedLibrary>true</HasSharedLibrary>
</_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' ">
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<LibraryPrefix>$(_DarwinLibraryPrefix)</LibraryPrefix>

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

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