Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into af/connectasync_saea
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfirsov committed Mar 19, 2020
2 parents 1796b80 + f80a514 commit a01760f
Show file tree
Hide file tree
Showing 528 changed files with 22,849 additions and 4,392 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>

<!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
<!-- Keep it in sync with PRERELEASE in clrdefinitions.cmake -->
<!-- Keep it in sync with PRERELEASE in eng/native/configureplatform.cmake -->
<IsPrerelease>true</IsPrerelease>

<!-- Experimental packages should not be stable -->
Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/building/mono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Once you've built the whole runtime and assuming you want to work with just mono
```
or on Windows,
```bat
build.cmd --subsetCategory mono
build.cmd -subsetCategory mono
```
When the build completes, product binaries will be dropped in the `artifacts\bin\mono\<OS>.<arch>.<flavor>` folder.

Expand All @@ -45,7 +45,7 @@ To generate nuget packages:
```
or on Windows,
```bat
build.cmd --subsetCategory mono -pack (with optional release configuration)
build.cmd -subsetCategory mono -pack (with optional release configuration)
```

The following packages will be created under `artifacts\packages\<configuration>\Shipping`:
Expand Down
64 changes: 32 additions & 32 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,61 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20162.4">
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenFacades" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.GenFacades" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.20162.3">
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="5.0.0-beta.20162.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="5.0.0-beta.20168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
<Sha>a5981bea658fa46405eb39b59f8d8bbd2730a141</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.IBC.CoreFx" Version="99.99.99-master-20190716.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
Expand All @@ -82,9 +82,9 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>d0bb63d2ec7060714e63ee4082fac48f2e57f3e2</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.6.0-preview-20200316-01">
<Dependency Name="Microsoft.NET.Test.Sdk" Version="16.6.0-preview-20200317-02">
<Uri>https://github.com/microsoft/vstest</Uri>
<Sha>1f9234279752d90f9c094f85164e0a61dec7ec3b</Sha>
<Sha>7e62090f0a27e3754724dd7f39bf10c14eb24b22</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="5.0.0-beta.20162.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
Expand Down Expand Up @@ -166,9 +166,9 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>e793fcc19797f407a1b7e98d5f81b04e25a551c3</Sha>
</Dependency>
<Dependency Name="ILLink.Tasks" Version="0.1.6-prerelease.20166.1">
<Dependency Name="ILLink.Tasks" Version="0.1.6-prerelease.20168.1">
<Uri>https://github.com/mono/linker</Uri>
<Sha>b6ff22367395cc62130bafcfb7a0023e7c5d6722</Sha>
<Sha>461e313c839bac4ac9f53932ca5df1778a586dce</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
24 changes: 12 additions & 12 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@
</ItemGroup>
<PropertyGroup>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatVersion>5.0.0-beta.20162.4</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20162.3</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20162.3</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>5.0.0-beta.20162.3</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20162.3</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20162.3</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20162.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20162.3</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetRemoteExecutorVersion>5.0.0-beta.20162.3</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>5.0.0-beta.20162.3</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetApiCompatVersion>5.0.0-beta.20168.1</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20168.1</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20168.1</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>5.0.0-beta.20168.1</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20168.1</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20168.1</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20168.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20168.1</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetRemoteExecutorVersion>5.0.0-beta.20168.1</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>5.0.0-beta.20168.1</MicrosoftDotNetVersionToolsTasksVersion>
<!-- Installer dependencies -->
<MicrosoftNETCoreAppVersion>5.0.0-alpha.1.20080.9</MicrosoftNETCoreAppVersion>
<MicrosoftNETCoreDotNetHostVersion>5.0.0-alpha.1.20080.9</MicrosoftNETCoreDotNetHostVersion>
Expand Down Expand Up @@ -114,7 +114,7 @@
<!-- System.Data.SqlClient -->
<SystemDataSqlClientVersion>4.8.0</SystemDataSqlClientVersion>
<!-- Testing -->
<MicrosoftNETTestSdkVersion>16.6.0-preview-20200316-01</MicrosoftNETTestSdkVersion>
<MicrosoftNETTestSdkVersion>16.6.0-preview-20200317-02</MicrosoftNETTestSdkVersion>
<XUnitVersion>2.4.1</XUnitVersion>
<TraceEventVersion>2.0.5</TraceEventVersion>
<NewtonsoftJsonVersion>12.0.3</NewtonsoftJsonVersion>
Expand All @@ -123,7 +123,7 @@
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>3.1.0-preview-20200129.1</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
<ILLinkTasksVersion>0.1.6-prerelease.20166.1</ILLinkTasksVersion>
<ILLinkTasksVersion>0.1.6-prerelease.20168.1</ILLinkTasksVersion>
<!-- Mono LLVM -->
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>6.0.1-alpha.1.20166.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>6.0.1-alpha.1.20166.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/codeOptimization.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
IBCMerge optimizations on Mac for now to unblock the offical build.
See issue https://github.com/dotnet/runtime/issues/33303
-->
<IsEligibleForNgenOptimization Condition="'$(TargetOS)' == 'OSX'">false</IsEligibleForNgenOptimization>
<IsEligibleForNgenOptimization Condition="'$(TargetOS)' == 'OSX' or '$(TargetOS)' == 'iOS'">false</IsEligibleForNgenOptimization>
</PropertyGroup>

<Target Name="SetApplyNgenOptimization"
Expand Down
39 changes: 25 additions & 14 deletions eng/common/cross/build-android-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,20 @@ for i in "$@"
done

# Obtain the location of the bash script to figure out where the root of the repo is.
__CrossDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
__Android_Cross_Dir="$(cd "$__CrossDir/../../../.tools/android-rootfs" && pwd)"
__ScriptBaseDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

__NDK_Dir="$__Android_Cross_Dir/android-ndk-$__NDK_Version"
__lldb_Dir="$__Android_Cross_Dir/lldb"
__ToolchainDir="$__Android_Cross_Dir/android-ndk-$__NDK_Version"
__CrossDir="$__ScriptBaseDir/../../../.tools/android-rootfs"

if [[ ! -f "$__CrossDir" ]]; then
mkdir -p "$__CrossDir"
fi

# Resolve absolute path to avoid `../` in build logs
__CrossDir="$( cd "$__CrossDir" && pwd )"

__NDK_Dir="$__CrossDir/android-ndk-$__NDK_Version"
__lldb_Dir="$__CrossDir/lldb"
__ToolchainDir="$__CrossDir/android-ndk-$__NDK_Version"

if [[ -n "$TOOLCHAIN_DIR" ]]; then
__ToolchainDir=$TOOLCHAIN_DIR
Expand All @@ -77,19 +85,20 @@ echo "Target Toolchain location: $__ToolchainDir"
if [ ! -d $__NDK_Dir ]; then
echo Downloading the NDK into $__NDK_Dir
mkdir -p $__NDK_Dir
wget -nv -nc --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux-x86_64.zip -O $__Android_Cross_Dir/android-ndk-$__NDK_Version-linux-x86_64.zip
unzip -q $__Android_Cross_Dir/android-ndk-$__NDK_Version-linux-x86_64.zip -d $__Android_Cross_Dir
wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux-x86_64.zip -O $__CrossDir/android-ndk-$__NDK_Version-linux-x86_64.zip
unzip -q $__CrossDir/android-ndk-$__NDK_Version-linux-x86_64.zip -d $__CrossDir
fi

if [ ! -d $__lldb_Dir ]; then
mkdir -p $__lldb_Dir
echo Downloading LLDB into $__lldb_Dir
wget -nv -nc --show-progress https://dl.google.com/android/repository/lldb-2.3.3614996-linux-x86_64.zip -O $__Android_Cross_Dir/lldb-2.3.3614996-linux-x86_64.zip
unzip -q $__Android_Cross_Dir/lldb-2.3.3614996-linux-x86_64.zip -d $__lldb_Dir
wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/lldb-2.3.3614996-linux-x86_64.zip -O $__CrossDir/lldb-2.3.3614996-linux-x86_64.zip
unzip -q $__CrossDir/lldb-2.3.3614996-linux-x86_64.zip -d $__lldb_Dir
fi

echo "Download dependencies..."
mkdir -p $__Android_Cross_Dir/tmp/$arch/
__TmpDir=$__CrossDir/tmp/$__BuildArch/
mkdir -p "$__TmpDir"

# combined dependencies for coreclr, installer and libraries
__AndroidPackages="libicu"
Expand All @@ -103,18 +112,20 @@ for path in $(wget -qO- http://termux.net/dists/stable/main/binary-$__AndroidArc

if [[ "$path" != "Filename:" ]]; then
echo "Working on: $path"
wget -qO- http://termux.net/$path | dpkg -x - $__Android_Cross_Dir/tmp/$__AndroidArch/
wget -qO- http://termux.net/$path | dpkg -x - "$__TmpDir"
fi
done

cp -R $__Android_Cross_Dir/tmp/$__AndroidArch/data/data/com.termux/files/usr/* $__ToolchainDir/sysroot/usr/
cp -R "$__TmpDir/data/data/com.termux/files/usr/"* "$__ToolchainDir/sysroot/usr/"

# Generate platform file for build.sh script to assign to __DistroRid
echo "Generating platform file..."
echo "RID=android.${__ApiLevel}-${__BuildArch}" > $__ToolchainDir/sysroot/android_platform

echo "Now to build coreclr, libraries and installers; run:"
echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \
--subsetCategory coreclr \
--subsetCategory libraries \
--subsetCategory coreclr
echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \
--subsetCategory libraries
echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \
--subsetCategory installer
6 changes: 6 additions & 0 deletions eng/common/templates/job/publish-build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
- name: _BuildConfig
value: ${{ parameters.configuration }}
- group: Publish-Build-Assets
# Skip component governance and codesign validation for SDL. These jobs
# create no content.
- name: skipComponentGovernanceDetection
value: true
- name: runCodesignValidationInjection
value: false

steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down
7 changes: 7 additions & 0 deletions eng/common/templates/post-build/common-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,10 @@ variables:
value: https://dotnetclimsrc.blob.core.windows.net/dotnet/index.json
- name: InternalInstallersBlobFeedKey
value: $(dotnetclimsrc-access-key)

# Skip component governance and codesign validation for SDL. These jobs
# create no content.
- name: skipComponentGovernanceDetection
value: true
- name: runCodesignValidationInjection
value: false
12 changes: 11 additions & 1 deletion eng/install-native-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,18 @@ elif [ "$1" = "OSX" ]; then
if [ "$?" != "0" ]; then
exit 1;
fi
elif [ "$1" = "iOS" ]; then
brew update
brew upgrade
if [ "$?" != "0" ]; then
exit 1;
fi
brew install openssl autoconf automake libtool pkg-config python3
if [ "$?" != "0" ]; then
exit 1;
fi
else
echo "Must pass \"Linux\" or \"OSX\" as first argument."
echo "Must pass \"Linux\", \"iOS\" or \"OSX\" as first argument."
exit 1
fi

34 changes: 21 additions & 13 deletions eng/native/configureplatform.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
include(CheckPIESupported)
include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)

# If set, indicates that this is not an officially supported release
# Keep in sync with IsPrerelease in Directory.Build.props
set(PRERELEASE 1)

#----------------------------------------
# Detect and set platform variable names
# - for non-windows build platform & architecture is detected using inbuilt CMAKE variables and cross target component configure
# - for windows we use the passed in parameter to CMAKE to determine build arch
#----------------------------------------
set(CLR_CMAKE_HOST_OS ${CMAKE_SYSTEM_NAME})
if(CLR_CMAKE_HOST_OS STREQUAL Linux)
if(CLR_CMAKE_HOST_OS STREQUAL Linux OR CLR_CMAKE_HOST_OS STREQUAL Android)
set(CLR_CMAKE_HOST_UNIX 1)
if(CLR_CROSS_COMPONENTS_BUILD)
if(CLR_CROSS_COMPONENTS_BUILD AND NOT CLR_CMAKE_HOST_OS STREQUAL Android)
# CMAKE_HOST_SYSTEM_PROCESSOR returns the value of `uname -p` on host.
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL amd64)
if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm" OR CLR_CMAKE_TARGET_ARCH STREQUAL "armel")
Expand All @@ -36,7 +40,7 @@ if(CLR_CMAKE_HOST_OS STREQUAL Linux)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
set(CLR_CMAKE_HOST_UNIX_ARM 1)
set(CLR_CMAKE_HOST_UNIX_ARMV7L 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL arm OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7-a)
set(CLR_CMAKE_HOST_UNIX_ARM 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
set(CLR_CMAKE_HOST_UNIX_ARM64 1)
Expand All @@ -54,10 +58,12 @@ if(CLR_CMAKE_HOST_OS STREQUAL Linux)
set(LINUX_ID_FILE "${CMAKE_SYSROOT}${LINUX_ID_FILE}")
endif()

execute_process(
COMMAND bash -c "source ${LINUX_ID_FILE} && echo \$ID"
OUTPUT_VARIABLE CLR_CMAKE_LINUX_ID
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(EXISTS ${LINUX_ID_FILE})
execute_process(
COMMAND bash -c "source ${LINUX_ID_FILE} && echo \$ID"
OUTPUT_VARIABLE CLR_CMAKE_LINUX_ID
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

if(DEFINED CLR_CMAKE_LINUX_ID)
if(CLR_CMAKE_LINUX_ID STREQUAL tizen)
Expand All @@ -66,12 +72,14 @@ if(CLR_CMAKE_HOST_OS STREQUAL Linux)
elseif(CLR_CMAKE_LINUX_ID STREQUAL alpine)
set(CLR_CMAKE_HOST_ALPINE_LINUX 1)
set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_LINUX_ID})
elseif(CLR_CMAKE_LINUX_ID STREQUAL android)
set(CLR_CMAKE_HOST_ANDROID 1)
set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_LINUX_ID})
endif()
endif(DEFINED CLR_CMAKE_LINUX_ID)
endif(CLR_CMAKE_HOST_OS STREQUAL Linux)

if(CLR_CMAKE_HOST_OS STREQUAL Android)
set(CLR_CMAKE_HOST_ANDROID 1)
set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_HOST_OS})
endif()
endif(CLR_CMAKE_HOST_OS STREQUAL Linux OR CLR_CMAKE_HOST_OS STREQUAL Android)

if(CLR_CMAKE_HOST_OS STREQUAL Darwin)
set(CLR_CMAKE_HOST_UNIX 1)
Expand Down Expand Up @@ -233,11 +241,11 @@ if(CLR_CMAKE_TARGET_OS STREQUAL alpine)
set(CLR_CMAKE_TARGET_ALPINE_LINUX 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL alpine)

if(CLR_CMAKE_TARGET_OS STREQUAL android)
if(CLR_CMAKE_TARGET_OS STREQUAL Android)
set(CLR_CMAKE_TARGET_UNIX 1)
set(CLR_CMAKE_TARGET_LINUX 1)
set(CLR_CMAKE_TARGET_ANDROID 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL android)
endif(CLR_CMAKE_TARGET_OS STREQUAL Android)

if(CLR_CMAKE_TARGET_OS STREQUAL Darwin)
set(CLR_CMAKE_TARGET_UNIX 1)
Expand Down
Loading

0 comments on commit a01760f

Please sign in to comment.