From 98862eaefdc9291dd323e06694657d2569973d41 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 12 Sep 2021 12:09:46 +0000 Subject: [PATCH 1/5] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210911.4 optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR From Version 1.0.0-prerelease.21460.6 -> To Version 1.0.0-prerelease.21461.4 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1794fa8be01bf..73478d25289f6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -206,21 +206,21 @@ https://github.com/dotnet/arcade fa4a48044d33222537e6dbd000f8a2adaa7a15c7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 5a381ab01db422ea25a6ed23b61fab5d2a7cd748 + 06f7062770eaefe8ced0bf5a7d7c27f682968a09 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 5a381ab01db422ea25a6ed23b61fab5d2a7cd748 + 06f7062770eaefe8ced0bf5a7d7c27f682968a09 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 5a381ab01db422ea25a6ed23b61fab5d2a7cd748 + 06f7062770eaefe8ced0bf5a7d7c27f682968a09 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 5a381ab01db422ea25a6ed23b61fab5d2a7cd748 + 06f7062770eaefe8ced0bf5a7d7c27f682968a09 https://github.com/dotnet/hotreload-utils diff --git a/eng/Versions.props b/eng/Versions.props index 307ddb8601b9e..55d0e84be312f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -126,10 +126,10 @@ 7.0.0-beta.21460.3 7.0.0-beta.21460.3 - 1.0.0-prerelease.21460.6 - 1.0.0-prerelease.21460.6 - 1.0.0-prerelease.21460.6 - 1.0.0-prerelease.21460.6 + 1.0.0-prerelease.21461.4 + 1.0.0-prerelease.21461.4 + 1.0.0-prerelease.21461.4 + 1.0.0-prerelease.21461.4 16.9.0-beta1.21055.5 2.0.0-beta1.20253.1 From 8e42f551c8c365879b73fbc872e4c33d94d3fe4e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 Sep 2021 12:10:16 +0000 Subject: [PATCH 2/5] Update dependencies from https://github.com/dotnet/runtime build 20210913.1 Microsoft.NETCore.ILAsm , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.App.Runtime.win-x64 , runtime.native.System.IO.Ports , Microsoft.NET.Sdk.IL , System.Runtime.CompilerServices.Unsafe , System.Text.Json From Version 7.0.0-alpha.1.21456.1 -> To Version 7.0.0-alpha.1.21463.1 --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 14 +++++++------- global.json | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 73478d25289f6..7362f2ce921b0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -158,37 +158,37 @@ https://github.com/dotnet/llvm-project 3eb7f6877f525ceccf00f0fc03c7da9fb7d2400d - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 - + https://github.com/dotnet/runtime - b7e10374429b5af32debc4660aa9bce41cfb903e + 0becd27f728f9e1eeb2a168789418ad4191ade99 https://github.com/mono/linker diff --git a/eng/Versions.props b/eng/Versions.props index 55d0e84be312f..97ea281be82f0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -69,12 +69,12 @@ 6.0.0-preview.1.102 - 7.0.0-alpha.1.21456.1 - 7.0.0-alpha.1.21456.1 - 7.0.0-alpha.1.21456.1 + 7.0.0-alpha.1.21463.1 + 7.0.0-alpha.1.21463.1 + 7.0.0-alpha.1.21463.1 3.1.0 - 7.0.0-alpha.1.21456.1 + 7.0.0-alpha.1.21463.1 5.0.0 4.3.0 @@ -108,11 +108,11 @@ 5.0.0 5.0.0 4.8.1 - 7.0.0-alpha.1.21456.1 - 7.0.0-alpha.1.21456.1 + 7.0.0-alpha.1.21463.1 + 7.0.0-alpha.1.21463.1 4.5.4 4.5.0 - 7.0.0-alpha.1.21456.1 + 7.0.0-alpha.1.21463.1 7.0.0-beta.21460.3 7.0.0-beta.21460.3 diff --git a/global.json b/global.json index 21e912c058025..d38910d716965 100644 --- a/global.json +++ b/global.json @@ -18,6 +18,6 @@ "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.21459.5", "Microsoft.Build.NoTargets": "3.1.0", "Microsoft.Build.Traversal": "3.0.23", - "Microsoft.NET.Sdk.IL": "7.0.0-alpha.1.21456.1" + "Microsoft.NET.Sdk.IL": "7.0.0-alpha.1.21463.1" } } From 87b082bcf82eb02f65d0f154bbc7a374ca472069 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 Sep 2021 13:07:25 +0000 Subject: [PATCH 3/5] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210912.2 optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR From Version 1.0.0-prerelease.21460.6 -> To Version 1.0.0-prerelease.21462.2 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7362f2ce921b0..b360c6106648e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -206,21 +206,21 @@ https://github.com/dotnet/arcade fa4a48044d33222537e6dbd000f8a2adaa7a15c7 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 06f7062770eaefe8ced0bf5a7d7c27f682968a09 + d097f81586afd81fbc7350fc15b374aa173f7cb2 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 06f7062770eaefe8ced0bf5a7d7c27f682968a09 + d097f81586afd81fbc7350fc15b374aa173f7cb2 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 06f7062770eaefe8ced0bf5a7d7c27f682968a09 + d097f81586afd81fbc7350fc15b374aa173f7cb2 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 06f7062770eaefe8ced0bf5a7d7c27f682968a09 + d097f81586afd81fbc7350fc15b374aa173f7cb2 https://github.com/dotnet/hotreload-utils diff --git a/eng/Versions.props b/eng/Versions.props index 97ea281be82f0..1db3500ea9521 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -126,10 +126,10 @@ 7.0.0-beta.21460.3 7.0.0-beta.21460.3 - 1.0.0-prerelease.21461.4 - 1.0.0-prerelease.21461.4 - 1.0.0-prerelease.21461.4 - 1.0.0-prerelease.21461.4 + 1.0.0-prerelease.21462.2 + 1.0.0-prerelease.21462.2 + 1.0.0-prerelease.21462.2 + 1.0.0-prerelease.21462.2 16.9.0-beta1.21055.5 2.0.0-beta1.20253.1 From b22db782131babb6a236fa260c2190d85fe8691f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 Sep 2021 13:07:56 +0000 Subject: [PATCH 4/5] Update dependencies from https://github.com/dotnet/hotreload-utils build 20210912.1 Microsoft.DotNet.HotReload.Utils.Generator.BuildTool From Version 1.0.2-alpha.0.21460.1 -> To Version 1.0.2-alpha.0.21462.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b360c6106648e..f24aa80001257 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -222,9 +222,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization d097f81586afd81fbc7350fc15b374aa173f7cb2 - + https://github.com/dotnet/hotreload-utils - f91c066e8786615beda82f967d80e07cd4983049 + 476db4296eb1f83cf68473f9e6d173570db6cb5f https://github.com/dotnet/runtime-assets diff --git a/eng/Versions.props b/eng/Versions.props index 1db3500ea9521..dcf2ea7d2639f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,7 +155,7 @@ 16.9.0-preview-20201201-01 1.0.0-prerelease.21460.2 1.0.0-prerelease.21460.2 - 1.0.2-alpha.0.21460.1 + 1.0.2-alpha.0.21462.1 2.4.1 2.4.2 1.3.0 From f9f292343a0d14a13ff832242b79070c76adbd20 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 14 Sep 2021 12:14:41 +0000 Subject: [PATCH 5/5] Update dependencies from https://github.com/dotnet/arcade build 20210913.4 Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk From Version 7.0.0-beta.21459.5 -> To Version 7.0.0-beta.21463.4 --- eng/Version.Details.xml | 72 +++++++------- eng/Versions.props | 28 +++--- eng/common/cross/build-rootfs.sh | 40 ++------ eng/common/cross/toolchain.cmake | 5 +- ...nd-native-compiler.sh => init-compiler.sh} | 98 ++++++++++--------- global.json | 8 +- 6 files changed, 118 insertions(+), 133 deletions(-) rename eng/common/native/{find-native-compiler.sh => init-compiler.sh} (52%) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f24aa80001257..6c2260a512341 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,73 +14,73 @@ - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 https://github.com/microsoft/vstest @@ -202,9 +202,9 @@ https://github.com/dotnet/xharness fdcd4d95dcedd2cc88eaaf5674a9d8bb8aafb8a2 - + https://github.com/dotnet/arcade - fa4a48044d33222537e6dbd000f8a2adaa7a15c7 + 4b7c80f398fd3dcea03fdc4e454789b61181d300 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index dcf2ea7d2639f..615f0cb1b6411 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -52,20 +52,20 @@ 1.0.0-rc.1.21459.41 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 2.5.1-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 - 7.0.0-beta.21459.5 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 2.5.1-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 + 7.0.0-beta.21463.4 6.0.0-preview.1.102 diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 5c05b39f10197..6fa2c8aa5511d 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -6,7 +6,7 @@ usage() { echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir ]" echo "BuildArch can be: arm(default), armel, arm64, x86" - echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." + echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." echo " for FreeBSD can be: freebsd11, freebsd12, freebsd13" echo " for illumos can be: illumos." echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" @@ -32,9 +32,9 @@ __UbuntuPackages="build-essential" __AlpinePackages="alpine-base" __AlpinePackages+=" build-base" __AlpinePackages+=" linux-headers" -__AlpinePackagesEdgeCommunity=" lldb-dev" -__AlpinePackagesEdgeMain+=" python3" -__AlpinePackagesEdgeMain+=" libedit" +__AlpinePackages+=" lldb-dev" +__AlpinePackages+=" python3" +__AlpinePackages+=" libedit" # symlinks fixer __UbuntuPackages+=" symlinks" @@ -185,23 +185,17 @@ while :; do __UbuntuRepo= __Tizen=tizen ;; - alpine|alpine3.9) + alpine|alpine3.13) __CodeName=alpine __UbuntuRepo= - __AlpineVersion=3.9 - __AlpinePackagesEdgeMain+=" llvm11-libs" - __AlpinePackagesEdgeMain+=" clang-libs" + __AlpineVersion=3.13 + __AlpinePackages+=" llvm10-libs" ;; - alpine3.13) + alpine3.14) __CodeName=alpine __UbuntuRepo= - __AlpineVersion=3.13 - # Alpine 3.13 has all the packages we need in the 3.13 repository - __AlpinePackages+=$__AlpinePackagesEdgeCommunity - __AlpinePackagesEdgeCommunity= - __AlpinePackages+=$__AlpinePackagesEdgeMain - __AlpinePackagesEdgeMain= - __AlpinePackages+=" llvm10-libs" + __AlpineVersion=3.14 + __AlpinePackages+=" llvm11-libs" ;; freebsd11) __FreeBSDBase="11.3-RELEASE" @@ -279,20 +273,6 @@ if [[ "$__CodeName" == "alpine" ]]; then -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ add $__AlpinePackages - if [[ -n "$__AlpinePackagesEdgeMain" ]]; then - $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ - -X http://dl-cdn.alpinelinux.org/alpine/edge/main \ - -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ - add $__AlpinePackagesEdgeMain - fi - - if [[ -n "$__AlpinePackagesEdgeCommunity" ]]; then - $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ - -X http://dl-cdn.alpinelinux.org/alpine/edge/community \ - -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ - add $__AlpinePackagesEdgeCommunity - fi - rm -r $__ApkToolsDir elif [[ "$__CodeName" == "freebsd" ]]; then mkdir -p $__RootfsDir/usr/local/etc diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index ec8971eb0195f..6501c3a955f78 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -44,7 +44,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") set(CMAKE_SYSTEM_PROCESSOR "x86_64") - set(triple "x86_64-unknown-freebsd11") + set(triple "x86_64-unknown-freebsd12") elseif (ILLUMOS) set(CMAKE_SYSTEM_PROCESSOR "x86_64") set(TOOLCHAIN "x86_64-illumos") @@ -91,6 +91,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") set(CMAKE_CXX_COMPILER_TARGET ${triple}) set(CMAKE_ASM_COMPILER_TARGET ${triple}) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld") elseif(ILLUMOS) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") diff --git a/eng/common/native/find-native-compiler.sh b/eng/common/native/init-compiler.sh similarity index 52% rename from eng/common/native/find-native-compiler.sh rename to eng/common/native/init-compiler.sh index aed19d07d506f..1daadf32a524f 100644 --- a/eng/common/native/find-native-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -1,39 +1,32 @@ #!/usr/bin/env bash # -# This file locates the native compiler with the given name and version and sets the environment variables to locate it. +# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables # -source="${BASH_SOURCE[0]}" - -# resolve $SOURCE until the file is no longer a symlink -while [[ -h $source ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -if [ $# -lt 0 ] -then +if [[ "$#" -lt 2 ]]; then echo "Usage..." - echo "find-native-compiler.sh " + echo "init-compiler.sh " + echo "Specify the target architecture." echo "Specify the name of compiler (clang or gcc)." echo "Specify the major version of compiler." echo "Specify the minor version of compiler." exit 1 fi -. $scriptroot/../pipeline-logging-functions.sh +. "$( cd -P "$( dirname "$0" )" && pwd )"/../pipeline-logging-functions.sh -compiler="$1" +build_arch="$1" +compiler="$2" cxxCompiler="$compiler++" -majorVersion="$2" -minorVersion="$3" +majorVersion="$3" +minorVersion="$4" -if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi +# clear the existing CC and CXX from environment +CC= +CXX= +LDFLAGS= + +if [[ "$compiler" == "gcc" ]]; then cxxCompiler="g++"; fi check_version_exists() { desired_version=-1 @@ -50,38 +43,38 @@ check_version_exists() { echo "$desired_version" } -if [ -z "$CLR_CC" ]; then +if [[ -z "$CLR_CC" ]]; then # Set default versions - if [ -z "$majorVersion" ]; then + if [[ -z "$majorVersion" ]]; then # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. - if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) - elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi + if [[ "$compiler" == "clang" ]]; then versions=( 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) + elif [[ "$compiler" == "gcc" ]]; then versions=( 11 10 9 8 7 6 5 4.9 ); fi for version in "${versions[@]}"; do parts=(${version//./ }) desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")" - if [ "$desired_version" != "-1" ]; then majorVersion="${parts[0]}"; break; fi + if [[ "$desired_version" != "-1" ]]; then majorVersion="${parts[0]}"; break; fi done - if [ -z "$majorVersion" ]; then + if [[ -z "$majorVersion" ]]; then if command -v "$compiler" > /dev/null; then - if [ "$(uname)" != "Darwin" ]; then + if [[ "$(uname)" != "Darwin" ]]; then Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH." fi - export CC="$(command -v "$compiler")" - export CXX="$(command -v "$cxxCompiler")" + CC="$(command -v "$compiler")" + CXX="$(command -v "$cxxCompiler")" else Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found." exit 1 fi else - if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then - if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then + if [[ "$compiler" == "clang" && "$majorVersion" -lt 5 ]]; then + if [[ "$build_arch" == "arm" || "$build_arch" == "armel" ]]; then if command -v "$compiler" > /dev/null; then Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH." - export CC="$(command -v "$compiler")" - export CXX="$(command -v "$cxxCompiler")" + CC="$(command -v "$compiler")" + CXX="$(command -v "$cxxCompiler")" else Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH." exit 1 @@ -91,31 +84,40 @@ if [ -z "$CLR_CC" ]; then fi else desired_version="$(check_version_exists "$majorVersion" "$minorVersion")" - if [ "$desired_version" = "-1" ]; then + if [[ "$desired_version" == "-1" ]]; then Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion." exit 1 fi fi - if [ -z "$CC" ]; then - export CC="$(command -v "$compiler$desired_version")" - export CXX="$(command -v "$cxxCompiler$desired_version")" - if [ -z "$CXX" ]; then export CXX="$(command -v "$cxxCompiler")"; fi + if [[ -z "$CC" ]]; then + CC="$(command -v "$compiler$desired_version")" + CXX="$(command -v "$cxxCompiler$desired_version")" + if [[ -z "$CXX" ]]; then CXX="$(command -v "$cxxCompiler")"; fi fi else - if [ ! -f "$CLR_CC" ]; then + if [[ ! -f "$CLR_CC" ]]; then Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist" exit 1 fi - export CC="$CLR_CC" - export CXX="$CLR_CXX" + CC="$CLR_CC" + CXX="$CLR_CXX" fi -if [ -z "$CC" ]; then - Write-PipelineTelemetryError -category "Build" "Unable to find $compiler." +if [[ -z "$CC" ]]; then + Write-PipelineTelemetryError -category "Build" "Unable to find $compiler." exit 1 fi -export CCC_CC="$CC" -export CCC_CXX="$CXX" -export SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")" +if [[ "$compiler" == "clang" ]]; then + if command -v "lld$desired_version" > /dev/null; then + # Only lld version >= 9 can be considered stable + if [[ "$majorVersion" -ge 9 ]]; then + LDFLAGS="-fuse-ld=lld" + fi + fi +fi + +SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")" + +export CC CXX LDFLAGS SCAN_BUILD_COMMAND diff --git a/global.json b/global.json index d38910d716965..fb9fac282f4cb 100644 --- a/global.json +++ b/global.json @@ -12,10 +12,10 @@ "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "7.0.0-beta.21459.5", - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.21459.5", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.21459.5", - "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.21459.5", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "7.0.0-beta.21463.4", + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.21463.4", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.21463.4", + "Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.21463.4", "Microsoft.Build.NoTargets": "3.1.0", "Microsoft.Build.Traversal": "3.0.23", "Microsoft.NET.Sdk.IL": "7.0.0-alpha.1.21463.1"