You've already forked linux-packaging-mono
Imported Upstream version 6.12.0.98
Former-commit-id: 066e1c5ebb0cc420bd293e60a01325420779fdd1
This commit is contained in:
parent
15e620f34f
commit
7d4706c3d7
6
external/llvm-project/eng/Build.props
vendored
Normal file
6
external/llvm-project/eng/Build.props
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ProjectToBuild Include="$(MSBuildThisFileDirectory)..\llvm.proj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
11
external/llvm-project/eng/Tools.props
vendored
Normal file
11
external/llvm-project/eng/Tools.props
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<MSBuildTreatWarningsAsErrors>false</MSBuildTreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- arcade -->
|
||||
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
19
external/llvm-project/eng/Version.Details.xml
vendored
Normal file
19
external/llvm-project/eng/Version.Details.xml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Dependencies>
|
||||
<ProductDependencies>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20261.9">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>898e51ed5fdcc4871087ac5754ca9056e58e575d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20261.9">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>898e51ed5fdcc4871087ac5754ca9056e58e575d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="5.0.0-beta.20261.9">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>898e51ed5fdcc4871087ac5754ca9056e58e575d</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
11
external/llvm-project/eng/Versions.props
vendored
Normal file
11
external/llvm-project/eng/Versions.props
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<PreReleaseVersionLabel>alpha</PreReleaseVersionLabel>
|
||||
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20261.9</MicrosoftDotNetBuildTasksPackagingVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
132
external/llvm-project/eng/build.ps1
vendored
Normal file
132
external/llvm-project/eng/build.ps1
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[switch][Alias('h')]$help,
|
||||
[switch][Alias('b')]$build,
|
||||
[switch][Alias('t')]$test,
|
||||
[switch]$buildtests,
|
||||
[string][Alias('c')]$configuration = "Debug",
|
||||
[string][Alias('f')]$framework,
|
||||
[string]$vs,
|
||||
[string]$os,
|
||||
[switch]$allconfigurations,
|
||||
[switch]$coverage,
|
||||
[string]$testscope,
|
||||
[string]$arch,
|
||||
[string]$runtimeConfiguration,
|
||||
[string]$librariesConfiguration,
|
||||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
|
||||
)
|
||||
|
||||
function Get-Help() {
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -os Build operating system: Windows_NT or Unix"
|
||||
Write-Host " -arch Build platform: x86, x64, arm or arm64"
|
||||
Write-Host " -configuration <value> Build configuration: Debug or Release (short: -c)"
|
||||
Write-Host " -verbosity <value> MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit (short: -h)"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Actions (defaults to -restore -build):"
|
||||
Write-Host " -restore Restore dependencies (short: -r)"
|
||||
Write-Host " -build Build all source projects (short: -b)"
|
||||
Write-Host " -buildtests Build all test projects"
|
||||
Write-Host " -rebuild Rebuild all source projects"
|
||||
Write-Host " -test Run all unit tests (short: -t)"
|
||||
Write-Host " -pack Package build outputs into NuGet packages"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host " -clean Clean the solution"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Libraries settings:"
|
||||
Write-Host " -vs Open the solution with VS for Test Explorer support. Path or solution name (ie -vs Microsoft.CSharp)"
|
||||
Write-Host " -framework Build framework: netcoreapp5.0 or net472 (short: -f)"
|
||||
Write-Host " -coverage Collect code coverage when testing"
|
||||
Write-Host " -testscope Scope tests, allowed values: innerloop, outerloop, all"
|
||||
Write-Host " -allconfigurations Build packages for all build configurations"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Command-line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -con for configuration, -t for test, etc.)."
|
||||
}
|
||||
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
|
||||
Get-Help
|
||||
exit 0
|
||||
}
|
||||
|
||||
# VS Test Explorer support for libraries
|
||||
if ($vs) {
|
||||
. $PSScriptRoot\common\tools.ps1
|
||||
|
||||
# Microsoft.DotNet.CoreSetup.sln is special - hosting tests are currently meant to run on the
|
||||
# bootstrapped .NET Core, not on the live-built runtime.
|
||||
if ([System.IO.Path]::GetFileName($vs) -ieq "Microsoft.DotNet.CoreSetup.sln") {
|
||||
if (-Not (Test-Path $vs)) {
|
||||
$vs = Join-Path "$PSScriptRoot\..\src\installer" $vs
|
||||
}
|
||||
|
||||
# This tells .NET Core to use the bootstrapped runtime to run the tests
|
||||
$env:DOTNET_ROOT=InitializeDotNetCli -install:$false
|
||||
}
|
||||
else {
|
||||
if (-Not (Test-Path $vs)) {
|
||||
$vs = Join-Path "$PSScriptRoot\..\src\libraries" $vs | Join-Path -ChildPath "$vs.sln"
|
||||
}
|
||||
|
||||
$archTestHost = if ($arch) { $arch } else { "x64" }
|
||||
|
||||
# This tells .NET Core to use the same dotnet.exe that build scripts use
|
||||
$env:DOTNET_ROOT="$PSScriptRoot\..\artifacts\bin\testhost\netcoreapp5.0-Windows_NT-$configuration-$archTestHost";
|
||||
$env:DEVPATH="$PSScriptRoot\..\artifacts\bin\testhost\net472-Windows_NT-$configuration-$archTestHost";
|
||||
}
|
||||
|
||||
# This tells MSBuild to load the SDK from the directory of the bootstrapped SDK
|
||||
$env:DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=InitializeDotNetCli -install:$false
|
||||
|
||||
# This tells .NET Core not to go looking for .NET Core in other places
|
||||
$env:DOTNET_MULTILEVEL_LOOKUP=0;
|
||||
|
||||
# Put our local dotnet.exe on PATH first so Visual Studio knows which one to use
|
||||
$env:PATH=($env:DOTNET_ROOT + ";" + $env:PATH);
|
||||
|
||||
# Launch Visual Studio with the locally defined environment variables
|
||||
."$vs"
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Check if an action is passed in
|
||||
$actions = "r","restore","b","build","buildtests","rebuild","t","test","pack","sign","publish","clean"
|
||||
$actionPassedIn = @(Compare-Object -ReferenceObject @($PSBoundParameters.Keys) -DifferenceObject $actions -ExcludeDifferent -IncludeEqual).Length -ne 0
|
||||
if ($null -ne $properties -and $actionPassedIn -ne $true) {
|
||||
$actionPassedIn = @(Compare-Object -ReferenceObject $properties -DifferenceObject $actions.ForEach({ "-" + $_ }) -ExcludeDifferent -IncludeEqual).Length -ne 0
|
||||
}
|
||||
|
||||
if (!$actionPassedIn) {
|
||||
$arguments = "-restore -build"
|
||||
}
|
||||
|
||||
$possibleDirToBuild = if($properties.Length -gt 0) { $properties[0]; } else { $null }
|
||||
|
||||
foreach ($argument in $PSBoundParameters.Keys)
|
||||
{
|
||||
switch($argument)
|
||||
{
|
||||
"build" { $arguments += " -build" }
|
||||
"buildtests" { if ($build -eq $true) { $arguments += " /p:BuildTests=true" } else { $arguments += " -build /p:BuildTests=only" } }
|
||||
"test" { $arguments += " -test" }
|
||||
"configuration" { $configuration = (Get-Culture).TextInfo.ToTitleCase($($PSBoundParameters[$argument])); $arguments += " /p:ConfigurationGroup=$configuration -configuration $configuration" }
|
||||
"runtimeConfiguration" { $arguments += " /p:RuntimeConfiguration=$((Get-Culture).TextInfo.ToTitleCase($($PSBoundParameters[$argument])))" }
|
||||
"framework" { $arguments += " /p:BuildTargetFramework=$($PSBoundParameters[$argument].ToLowerInvariant())" }
|
||||
"os" { $arguments += " /p:OSGroup=$($PSBoundParameters[$argument])" }
|
||||
"allconfigurations" { $arguments += " /p:BuildAllConfigurations=true" }
|
||||
"arch" { $arguments += " /p:ArchGroup=$($PSBoundParameters[$argument]) /p:TargetArchitecture=$($PSBoundParameters[$argument])" }
|
||||
"properties" { $arguments += " " + $properties }
|
||||
default { $arguments += " /p:$argument=$($PSBoundParameters[$argument])" }
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-Expression "& `"$PSScriptRoot/common/build.ps1`" $arguments"
|
||||
exit $lastExitCode
|
170
external/llvm-project/eng/build.sh
vendored
Executable file
170
external/llvm-project/eng/build.sh
vendored
Executable file
@@ -0,0 +1,170 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ue
|
||||
|
||||
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 )"
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Common settings:"
|
||||
echo " --os Build operating system: Windows_NT or Unix"
|
||||
echo " --arch Build platform: x86, x64, arm or arm64"
|
||||
echo " --configuration <value> Build configuration: Debug or Release (short: -c)"
|
||||
echo " --verbosity <value> MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
echo " --binaryLog Output binary log (short: -bl)"
|
||||
echo " --cross Optional argument to signify cross compilation"
|
||||
echo " --help Print help and exit (short: -h)"
|
||||
echo ""
|
||||
|
||||
echo "Actions (defaults to --restore --build):"
|
||||
echo " --restore Restore dependencies (short: -r)"
|
||||
echo " --build Build all source projects (short: -b)"
|
||||
echo " --buildtests Build all test projects"
|
||||
echo " --rebuild Rebuild all source projects"
|
||||
echo " --test Run all unit tests (short: -t)"
|
||||
echo " --pack Package build outputs into NuGet packages"
|
||||
echo " --sign Sign build outputs"
|
||||
echo " --publish Publish artifacts (e.g. symbols)"
|
||||
echo " --clean Clean the solution"
|
||||
echo ""
|
||||
|
||||
echo "Libraries settings:"
|
||||
echo " --framework Build framework: netcoreapp or net472 (short: -f)"
|
||||
echo " --coverage Collect code coverage when testing"
|
||||
echo " --testscope Test scope, allowed values: innerloop, outerloop, all"
|
||||
echo " --allconfigurations Build packages for all build configurations"
|
||||
echo ""
|
||||
|
||||
echo "Native build settings:"
|
||||
echo " --clang Optional argument to build using clang in PATH (default)"
|
||||
echo " --clangx.y Optional argument to build using clang version x.y"
|
||||
echo " --cmakeargs User-settable additional arguments passed to CMake."
|
||||
echo " --gcc Optional argument to build using gcc in PATH (default)"
|
||||
echo " --gccx.y Optional argument to build using gcc version x.y"
|
||||
|
||||
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
|
||||
echo "Arguments can also be passed in with a single hyphen."
|
||||
}
|
||||
|
||||
arguments=''
|
||||
cmakeargs=''
|
||||
extraargs=''
|
||||
build=false
|
||||
buildtests=false
|
||||
checkedPossibleDirectoryToBuild=false
|
||||
|
||||
# Check if an action is passed in
|
||||
declare -a actions=("r" "restore" "b" "build" "buildtests" "rebuild" "t" "test" "pack" "sign" "publish" "clean")
|
||||
actInt=($(comm -12 <(printf '%s\n' "${actions[@]/#/-}" | sort) <(printf '%s\n' "${@/#--/-}" | sort)))
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
|
||||
case "$opt" in
|
||||
-help|-h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-arch)
|
||||
arguments="$arguments /p:ArchGroup=$2 /p:TargetArchitecture=$2"
|
||||
shift 2
|
||||
;;
|
||||
-configuration|-c)
|
||||
val="$(tr '[:lower:]' '[:upper:]' <<< ${2:0:1})${2:1}"
|
||||
arguments="$arguments /p:ConfigurationGroup=$val -configuration $val"
|
||||
shift 2
|
||||
;;
|
||||
-framework|-f)
|
||||
val="$(echo "$2" | awk '{print tolower($0)}')"
|
||||
arguments="$arguments /p:BuildTargetFramework=$val"
|
||||
shift 2
|
||||
;;
|
||||
-os)
|
||||
arguments="$arguments /p:OSGroup=$2"
|
||||
shift 2
|
||||
;;
|
||||
-allconfigurations)
|
||||
arguments="$arguments /p:BuildAllConfigurations=true"
|
||||
shift 1
|
||||
;;
|
||||
-build)
|
||||
build=true
|
||||
arguments="$arguments -build"
|
||||
shift 1
|
||||
;;
|
||||
-buildtests)
|
||||
buildtests=true
|
||||
shift 1
|
||||
;;
|
||||
-testscope)
|
||||
arguments="$arguments /p:TestScope=$2"
|
||||
shift 2
|
||||
;;
|
||||
-coverage)
|
||||
arguments="$arguments /p:Coverage=true"
|
||||
shift 1
|
||||
;;
|
||||
-stripsymbols)
|
||||
arguments="$arguments /p:BuildNativeStripSymbols=true"
|
||||
shift 1
|
||||
;;
|
||||
-runtimeconfiguration)
|
||||
val="$(tr '[:lower:]' '[:upper:]' <<< ${2:0:1})${2:1}"
|
||||
arguments="$arguments /p:RuntimeConfiguration=$val"
|
||||
shift 2
|
||||
;;
|
||||
-librariesconfiguration)
|
||||
arguments="$arguments /p:LibrariesConfiguration=$2"
|
||||
shift 2
|
||||
;;
|
||||
-cross)
|
||||
arguments="$arguments /p:CrossBuild=True"
|
||||
shift 1
|
||||
;;
|
||||
-clang*)
|
||||
arguments="$arguments /p:Compiler=$opt"
|
||||
shift 1
|
||||
;;
|
||||
-cmakeargs)
|
||||
cmakeargs="${cmakeargs} ${opt} $2"
|
||||
shift 2
|
||||
;;
|
||||
-gcc*)
|
||||
arguments="$arguments /p:Compiler=$opt"
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
ea=$1
|
||||
|
||||
extraargs="$extraargs $ea"
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$buildtests" == true ]]; then
|
||||
if [[ "$build" == true ]]; then
|
||||
arguments="$arguments /p:BuildTests=true"
|
||||
else
|
||||
arguments="$arguments -build /p:BuildTests=only"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${#actInt[@]} -eq 0 ]; then
|
||||
arguments="-restore -build $arguments"
|
||||
fi
|
||||
|
||||
# URL-encode space (%20) to avoid quoting issues until the msbuild call in /eng/common/tools.sh.
|
||||
# In *proj files (XML docs), URL-encoded string are rendered in their decoded form.
|
||||
cmakeargs="${cmakeargs// /%20}"
|
||||
arguments="$arguments /p:CMakeArgs=\"$cmakeargs\" $extraargs"
|
||||
"$scriptroot/common/build.sh" $arguments
|
40
external/llvm-project/eng/common-variables.yml
vendored
Normal file
40
external/llvm-project/eng/common-variables.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
variables:
|
||||
# Cannot use key:value syntax in root defined variables
|
||||
- name: _TeamName
|
||||
value: DotNetCore
|
||||
- name: _DotNetArtifactsCategory
|
||||
value: .NETCore
|
||||
- name: _DotNetValidationArtifactsCategory
|
||||
value: .NETCore
|
||||
- name: HelixApiAccessToken
|
||||
value: ''
|
||||
- name: _RunAsPublic
|
||||
value: True
|
||||
- name: _RunAsInternal
|
||||
value: False
|
||||
- name: _InternalBuildArgs
|
||||
value: ''
|
||||
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- name: _RunAsPublic
|
||||
value: False
|
||||
- name: _RunAsInternal
|
||||
value: True
|
||||
- name: _SignType
|
||||
value: real
|
||||
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
|
||||
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
|
||||
# DotNet-HelixApi-Access provides: HelixApiAccessToken
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: Publish-Build-Assets
|
||||
- group: DotNet-VSTS-Bot
|
||||
- group: DotNet-HelixApi-Access
|
||||
- name: _InternalBuildArgs
|
||||
value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
|
||||
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
||||
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
|
||||
/p:DotNetPublishToBlobFeed=true
|
||||
/p:DotNetPublishUsingPipelines=true
|
||||
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
2
external/llvm-project/eng/common/CIBuild.cmd
vendored
Normal file
2
external/llvm-project/eng/common/CIBuild.cmd
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
|
11
external/llvm-project/eng/common/PSScriptAnalyzerSettings.psd1
vendored
Normal file
11
external/llvm-project/eng/common/PSScriptAnalyzerSettings.psd1
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
@{
|
||||
IncludeRules=@('PSAvoidUsingCmdletAliases',
|
||||
'PSAvoidUsingWMICmdlet',
|
||||
'PSAvoidUsingPositionalParameters',
|
||||
'PSAvoidUsingInvokeExpression',
|
||||
'PSUseDeclaredVarsMoreThanAssignments',
|
||||
'PSUseCmdletCorrectly',
|
||||
'PSStandardDSCFunctionsInResource',
|
||||
'PSUseIdenticalMandatoryParametersForDSC',
|
||||
'PSUseIdenticalParametersForDSC')
|
||||
}
|
28
external/llvm-project/eng/common/README.md
vendored
Normal file
28
external/llvm-project/eng/common/README.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Don't touch this folder
|
||||
|
||||
uuuuuuuuuuuuuuuuuuuu
|
||||
u" uuuuuuuuuuuuuuuuuu "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
|
||||
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
|
||||
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
|
||||
$ $$$" ... "$... ...$" ... "$$$ ... "$$$ $
|
||||
$ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $
|
||||
$ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $
|
||||
$ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $
|
||||
$ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $
|
||||
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u "$$$$$$$$$$$$$$$$$$$$" u"
|
||||
"u """""""""""""""""" u"
|
||||
""""""""""""""""""""
|
||||
|
||||
!!! Changes made in this directory are subject to being overwritten by automation !!!
|
||||
|
||||
The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.
|
143
external/llvm-project/eng/common/SetupNugetSources.ps1
vendored
Normal file
143
external/llvm-project/eng/common/SetupNugetSources.ps1
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
|
||||
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
|
||||
#
|
||||
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
|
||||
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
|
||||
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
|
||||
#
|
||||
# This script needs to be called in every job that will restore packages and which the base repo has
|
||||
# private AzDO feeds in the NuGet.config.
|
||||
#
|
||||
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
|
||||
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
|
||||
#
|
||||
# - task: PowerShell@2
|
||||
# displayName: Setup Private Feeds Credentials
|
||||
# condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||||
# inputs:
|
||||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
|
||||
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
|
||||
# env:
|
||||
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
[CmdletBinding()]
|
||||
param (
|
||||
[Parameter(Mandatory = $true)][string]$ConfigFile,
|
||||
[Parameter(Mandatory = $true)][string]$Password
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
# Add source entry to PackageSources
|
||||
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
|
||||
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
|
||||
|
||||
if ($packageSource -eq $null)
|
||||
{
|
||||
$packageSource = $doc.CreateElement("add")
|
||||
$packageSource.SetAttribute("key", $SourceName)
|
||||
$packageSource.SetAttribute("value", $SourceEndPoint)
|
||||
$sources.AppendChild($packageSource) | Out-Null
|
||||
}
|
||||
else {
|
||||
Write-Host "Package source $SourceName already present."
|
||||
}
|
||||
|
||||
AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password
|
||||
}
|
||||
|
||||
# Add a credential node for the specified source
|
||||
function AddCredential($creds, $source, $username, $password) {
|
||||
# Looks for credential configuration for the given SourceName. Create it if none is found.
|
||||
$sourceElement = $creds.SelectSingleNode($Source)
|
||||
if ($sourceElement -eq $null)
|
||||
{
|
||||
$sourceElement = $doc.CreateElement($Source)
|
||||
$creds.AppendChild($sourceElement) | Out-Null
|
||||
}
|
||||
|
||||
# Add the <Username> node to the credential if none is found.
|
||||
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
|
||||
if ($usernameElement -eq $null)
|
||||
{
|
||||
$usernameElement = $doc.CreateElement("add")
|
||||
$usernameElement.SetAttribute("key", "Username")
|
||||
$sourceElement.AppendChild($usernameElement) | Out-Null
|
||||
}
|
||||
$usernameElement.SetAttribute("value", $Username)
|
||||
|
||||
# Add the <ClearTextPassword> to the credential if none is found.
|
||||
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
|
||||
# -> https://github.com/NuGet/Home/issues/5526
|
||||
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
|
||||
if ($passwordElement -eq $null)
|
||||
{
|
||||
$passwordElement = $doc.CreateElement("add")
|
||||
$passwordElement.SetAttribute("key", "ClearTextPassword")
|
||||
$sourceElement.AppendChild($passwordElement) | Out-Null
|
||||
}
|
||||
$passwordElement.SetAttribute("value", $Password)
|
||||
}
|
||||
|
||||
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
|
||||
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
|
||||
|
||||
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
|
||||
|
||||
ForEach ($PackageSource in $maestroPrivateSources) {
|
||||
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
|
||||
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
|
||||
}
|
||||
}
|
||||
|
||||
if (!(Test-Path $ConfigFile -PathType Leaf)) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if (!$Password) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
# Load NuGet.config
|
||||
$doc = New-Object System.Xml.XmlDocument
|
||||
$filename = (Get-Item $ConfigFile).FullName
|
||||
$doc.Load($filename)
|
||||
|
||||
# Get reference to <PackageSources> or create one if none exist already
|
||||
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
|
||||
if ($sources -eq $null) {
|
||||
$sources = $doc.CreateElement("packageSources")
|
||||
$doc.DocumentElement.AppendChild($sources) | Out-Null
|
||||
}
|
||||
|
||||
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
|
||||
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
|
||||
if ($creds -eq $null) {
|
||||
$creds = $doc.CreateElement("packageSourceCredentials")
|
||||
$doc.DocumentElement.AppendChild($creds) | Out-Null
|
||||
}
|
||||
|
||||
$userName = "dn-bot"
|
||||
|
||||
# Insert credential nodes for Maestro's private feeds
|
||||
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
|
||||
|
||||
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
|
||||
if ($dotnet3Source -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
}
|
||||
|
||||
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
|
||||
if ($dotnet31Source -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
}
|
||||
|
||||
$doc.Save($filename)
|
149
external/llvm-project/eng/common/SetupNugetSources.sh
vendored
Normal file
149
external/llvm-project/eng/common/SetupNugetSources.sh
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
|
||||
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
|
||||
#
|
||||
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
|
||||
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
|
||||
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
|
||||
#
|
||||
# This script needs to be called in every job that will restore packages and which the base repo has
|
||||
# private AzDO feeds in the NuGet.config.
|
||||
#
|
||||
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
|
||||
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
|
||||
#
|
||||
# - task: Bash@3
|
||||
# displayName: Setup Private Feeds Credentials
|
||||
# inputs:
|
||||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
|
||||
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
|
||||
# condition: ne(variables['Agent.OS'], 'Windows_NT')
|
||||
# env:
|
||||
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
ConfigFile=$1
|
||||
CredToken=$2
|
||||
NL='\n'
|
||||
TB=' '
|
||||
|
||||
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 )"
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
if [ ! -f "$ConfigFile" ]; then
|
||||
Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
if [ -z "$CredToken" ]; then
|
||||
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
if [[ `uname -s` == "Darwin" ]]; then
|
||||
NL=$'\\\n'
|
||||
TB=''
|
||||
fi
|
||||
|
||||
# Ensure there is a <packageSources>...</packageSources> section.
|
||||
grep -i "<packageSources>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding <packageSources>...</packageSources> section."
|
||||
ConfigNodeHeader="<configuration>"
|
||||
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"
|
||||
|
||||
sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config
|
||||
fi
|
||||
|
||||
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
|
||||
grep -i "<packageSourceCredentials>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
|
||||
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
|
||||
fi
|
||||
|
||||
PackageSources=()
|
||||
|
||||
# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
|
||||
grep -i "<add key=\"dotnet3\"" $ConfigFile
|
||||
|
||||
if [ "$?" == "0" ]; then
|
||||
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3-internal')
|
||||
|
||||
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal-transport to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3-internal-transport')
|
||||
fi
|
||||
|
||||
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
|
||||
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
|
||||
if [ "$?" == "0" ]; then
|
||||
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3.1-internal to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3.1-internal')
|
||||
|
||||
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3.1-internal-transport to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3.1-internal-transport')
|
||||
fi
|
||||
|
||||
# I want things split line by line
|
||||
PrevIFS=$IFS
|
||||
IFS=$'\n'
|
||||
PackageSources+="$IFS"
|
||||
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
|
||||
IFS=$PrevIFS
|
||||
|
||||
for FeedName in ${PackageSources[@]} ; do
|
||||
# Check if there is no existing credential for this FeedName
|
||||
grep -i "<$FeedName>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding credentials for $FeedName."
|
||||
|
||||
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
|
||||
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
|
||||
|
||||
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
|
||||
fi
|
||||
done
|
157
external/llvm-project/eng/common/build.ps1
vendored
Normal file
157
external/llvm-project/eng/common/build.ps1
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string][Alias('c')]$configuration = "Debug",
|
||||
[string]$platform = $null,
|
||||
[string] $projects,
|
||||
[string][Alias('v')]$verbosity = "minimal",
|
||||
[string] $msbuildEngine = $null,
|
||||
[bool] $warnAsError = $true,
|
||||
[bool] $nodeReuse = $true,
|
||||
[switch][Alias('r')]$restore,
|
||||
[switch] $deployDeps,
|
||||
[switch][Alias('b')]$build,
|
||||
[switch] $rebuild,
|
||||
[switch] $deploy,
|
||||
[switch][Alias('t')]$test,
|
||||
[switch] $integrationTest,
|
||||
[switch] $performanceTest,
|
||||
[switch] $sign,
|
||||
[switch] $pack,
|
||||
[switch] $publish,
|
||||
[switch] $clean,
|
||||
[switch][Alias('bl')]$binaryLog,
|
||||
[switch][Alias('nobl')]$excludeCIBinarylog,
|
||||
[switch] $ci,
|
||||
[switch] $prepareMachine,
|
||||
[switch] $help,
|
||||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
|
||||
)
|
||||
|
||||
# Unset 'Platform' environment variable to avoid unwanted collision in InstallDotNetCore.targets file
|
||||
# some computer has this env var defined (e.g. Some HP)
|
||||
if($env:Platform) {
|
||||
$env:Platform=""
|
||||
}
|
||||
function Print-Usage() {
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
|
||||
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Actions:"
|
||||
Write-Host " -restore Restore dependencies (short: -r)"
|
||||
Write-Host " -build Build solution (short: -b)"
|
||||
Write-Host " -rebuild Rebuild solution"
|
||||
Write-Host " -deploy Deploy built VSIXes"
|
||||
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
|
||||
Write-Host " -test Run all unit tests in the solution (short: -t)"
|
||||
Write-Host " -integrationTest Run all integration tests in the solution"
|
||||
Write-Host " -performanceTest Run all performance tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host " -clean Clean the solution"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Advanced settings:"
|
||||
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
|
||||
Write-Host " -ci Set when running on CI server"
|
||||
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Command line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
|
||||
}
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InitializeCustomToolset {
|
||||
if (-not $restore) {
|
||||
return
|
||||
}
|
||||
|
||||
$script = Join-Path $EngRoot 'restore-toolset.ps1'
|
||||
|
||||
if (Test-Path $script) {
|
||||
. $script
|
||||
}
|
||||
}
|
||||
|
||||
function Build {
|
||||
$toolsetBuildProj = InitializeToolset
|
||||
InitializeCustomToolset
|
||||
|
||||
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
|
||||
$platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
|
||||
|
||||
if ($projects) {
|
||||
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
|
||||
# Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty.
|
||||
[string[]] $msbuildArgs = $properties
|
||||
|
||||
# Resolve relative project paths into full paths
|
||||
$projects = ($projects.Split(';').ForEach({Resolve-Path $_}) -join ';')
|
||||
|
||||
$msbuildArgs += "/p:Projects=$projects"
|
||||
$properties = $msbuildArgs
|
||||
}
|
||||
|
||||
MSBuild $toolsetBuildProj `
|
||||
$bl `
|
||||
$platformArg `
|
||||
/p:Configuration=$configuration `
|
||||
/p:RepoRoot=$RepoRoot `
|
||||
/p:Restore=$restore `
|
||||
/p:DeployDeps=$deployDeps `
|
||||
/p:Build=$build `
|
||||
/p:Rebuild=$rebuild `
|
||||
/p:Deploy=$deploy `
|
||||
/p:Test=$test `
|
||||
/p:Pack=$pack `
|
||||
/p:IntegrationTest=$integrationTest `
|
||||
/p:PerformanceTest=$performanceTest `
|
||||
/p:Sign=$sign `
|
||||
/p:Publish=$publish `
|
||||
@properties
|
||||
}
|
||||
|
||||
try {
|
||||
if ($clean) {
|
||||
if (Test-Path $ArtifactsDir) {
|
||||
Remove-Item -Recurse -Force $ArtifactsDir
|
||||
Write-Host 'Artifacts directory deleted.'
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
|
||||
Print-Usage
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($ci) {
|
||||
if (-not $excludeCIBinarylog) {
|
||||
$binaryLog = $true
|
||||
}
|
||||
$nodeReuse = $false
|
||||
}
|
||||
|
||||
if ($restore) {
|
||||
InitializeNativeTools
|
||||
}
|
||||
|
||||
Build
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
ExitWithExitCode 0
|
223
external/llvm-project/eng/common/build.sh
vendored
Executable file
223
external/llvm-project/eng/common/build.sh
vendored
Executable file
@@ -0,0 +1,223 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Stop script if unbound variable found (use ${var:-} if intentional)
|
||||
set -u
|
||||
|
||||
# Stop script if command returns non-zero exit code.
|
||||
# Prevents hidden errors caused by missing error code propagation.
|
||||
set -e
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Common settings:"
|
||||
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
echo " --binaryLog Create MSBuild binary log (short: -bl)"
|
||||
echo " --help Print help and exit (short: -h)"
|
||||
echo ""
|
||||
|
||||
echo "Actions:"
|
||||
echo " --restore Restore dependencies (short: -r)"
|
||||
echo " --build Build solution (short: -b)"
|
||||
echo " --rebuild Rebuild solution"
|
||||
echo " --test Run all unit tests in the solution (short: -t)"
|
||||
echo " --integrationTest Run all integration tests in the solution"
|
||||
echo " --performanceTest Run all performance tests in the solution"
|
||||
echo " --pack Package build outputs into NuGet packages and Willow components"
|
||||
echo " --sign Sign build outputs"
|
||||
echo " --publish Publish artifacts (e.g. symbols)"
|
||||
echo " --clean Clean the solution"
|
||||
echo ""
|
||||
|
||||
echo "Advanced settings:"
|
||||
echo " --projects <value> Project or solution file(s) to build"
|
||||
echo " --ci Set when running on CI server"
|
||||
echo " --excludeCIBinarylog Don't output binary log (short: -nobl)"
|
||||
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
|
||||
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
echo ""
|
||||
echo "Command line arguments not listed above are passed thru to msbuild."
|
||||
echo "Arguments can also be passed in with a single hyphen."
|
||||
}
|
||||
|
||||
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 )"
|
||||
|
||||
restore=false
|
||||
build=false
|
||||
rebuild=false
|
||||
test=false
|
||||
integration_test=false
|
||||
performance_test=false
|
||||
pack=false
|
||||
publish=false
|
||||
sign=false
|
||||
public=false
|
||||
ci=false
|
||||
clean=false
|
||||
|
||||
warn_as_error=true
|
||||
node_reuse=true
|
||||
binary_log=false
|
||||
exclude_ci_binary_log=false
|
||||
pipelines_log=false
|
||||
|
||||
projects=''
|
||||
configuration='Debug'
|
||||
prepare_machine=false
|
||||
verbosity='minimal'
|
||||
|
||||
properties=''
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
|
||||
case "$opt" in
|
||||
-help|-h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-clean)
|
||||
clean=true
|
||||
;;
|
||||
-configuration|-c)
|
||||
configuration=$2
|
||||
shift
|
||||
;;
|
||||
-verbosity|-v)
|
||||
verbosity=$2
|
||||
shift
|
||||
;;
|
||||
-binarylog|-bl)
|
||||
binary_log=true
|
||||
;;
|
||||
-excludeCIBinarylog|-nobl)
|
||||
exclude_ci_binary_log=true
|
||||
;;
|
||||
-pipelineslog|-pl)
|
||||
pipelines_log=true
|
||||
;;
|
||||
-restore|-r)
|
||||
restore=true
|
||||
;;
|
||||
-build|-b)
|
||||
build=true
|
||||
;;
|
||||
-rebuild)
|
||||
rebuild=true
|
||||
;;
|
||||
-pack)
|
||||
pack=true
|
||||
;;
|
||||
-test|-t)
|
||||
test=true
|
||||
;;
|
||||
-integrationtest)
|
||||
integration_test=true
|
||||
;;
|
||||
-performancetest)
|
||||
performance_test=true
|
||||
;;
|
||||
-sign)
|
||||
sign=true
|
||||
;;
|
||||
-publish)
|
||||
publish=true
|
||||
;;
|
||||
-preparemachine)
|
||||
prepare_machine=true
|
||||
;;
|
||||
-projects)
|
||||
projects=$2
|
||||
shift
|
||||
;;
|
||||
-ci)
|
||||
ci=true
|
||||
;;
|
||||
-warnaserror)
|
||||
warn_as_error=$2
|
||||
shift
|
||||
;;
|
||||
-nodereuse)
|
||||
node_reuse=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
properties="$properties $1"
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ "$ci" == true ]]; then
|
||||
pipelines_log=true
|
||||
node_reuse=false
|
||||
if [[ "$exclude_ci_binary_log" == false ]]; then
|
||||
binary_log=true
|
||||
fi
|
||||
fi
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
function InitializeCustomToolset {
|
||||
local script="$eng_root/restore-toolset.sh"
|
||||
|
||||
if [[ -a "$script" ]]; then
|
||||
. "$script"
|
||||
fi
|
||||
}
|
||||
|
||||
function Build {
|
||||
InitializeToolset
|
||||
InitializeCustomToolset
|
||||
|
||||
if [[ ! -z "$projects" ]]; then
|
||||
properties="$properties /p:Projects=$projects"
|
||||
fi
|
||||
|
||||
local bl=""
|
||||
if [[ "$binary_log" == true ]]; then
|
||||
bl="/bl:\"$log_dir/Build.binlog\""
|
||||
fi
|
||||
|
||||
MSBuild $_InitializeToolset \
|
||||
$bl \
|
||||
/p:Configuration=$configuration \
|
||||
/p:RepoRoot="$repo_root" \
|
||||
/p:Restore=$restore \
|
||||
/p:Build=$build \
|
||||
/p:Rebuild=$rebuild \
|
||||
/p:Test=$test \
|
||||
/p:Pack=$pack \
|
||||
/p:IntegrationTest=$integration_test \
|
||||
/p:PerformanceTest=$performance_test \
|
||||
/p:Sign=$sign \
|
||||
/p:Publish=$publish \
|
||||
$properties
|
||||
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
|
||||
if [[ "$clean" == true ]]; then
|
||||
if [ -d "$artifacts_dir" ]; then
|
||||
rm -rf $artifacts_dir
|
||||
echo "Artifacts directory deleted."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$restore" == true ]]; then
|
||||
InitializeNativeTools
|
||||
fi
|
||||
|
||||
Build
|
16
external/llvm-project/eng/common/cibuild.sh
vendored
Executable file
16
external/llvm-project/eng/common/cibuild.sh
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
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 )"
|
||||
|
||||
. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
|
11
external/llvm-project/eng/common/cross/arm/sources.list.bionic
vendored
Normal file
11
external/llvm-project/eng/common/cross/arm/sources.list.bionic
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
|
3
external/llvm-project/eng/common/cross/arm/sources.list.jessie
vendored
Normal file
3
external/llvm-project/eng/common/cross/arm/sources.list.jessie
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Debian (sid) # UNSTABLE
|
||||
deb http://ftp.debian.org/debian/ sid main contrib non-free
|
||||
deb-src http://ftp.debian.org/debian/ sid main contrib non-free
|
11
external/llvm-project/eng/common/cross/arm/sources.list.trusty
vendored
Normal file
11
external/llvm-project/eng/common/cross/arm/sources.list.trusty
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
11
external/llvm-project/eng/common/cross/arm/sources.list.xenial
vendored
Normal file
11
external/llvm-project/eng/common/cross/arm/sources.list.xenial
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
|
11
external/llvm-project/eng/common/cross/arm/sources.list.zesty
vendored
Normal file
11
external/llvm-project/eng/common/cross/arm/sources.list.zesty
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user