Skip to content

Llvm20 #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 5 additions & 7 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ on:
push:
branches:
- develop
- llvm_20
- LLVM20

paths-ignore:
- '**.md'
- '**.dic'

pull_request:
branches:
- develop
- llvm_20
- LLVM20

paths-ignore:
- '**.md'
- '**.dic'

jobs:
build:
Expand All @@ -24,7 +26,6 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Build Source
run: .\Build-All.ps1 -ForceClean -BuildMode Source
Expand Down Expand Up @@ -59,10 +60,9 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Build Docs
run: .\Build-All.ps1 -ForceClean -BuildMode Docs
run: .\Build-Docs.ps1 -FullInit -Configuration Release

- name: Upload docs artifact
uses: actions/upload-artifact@v4
Expand All @@ -76,5 +76,3 @@ jobs:
with:
name: Build Logs
path: .\BuildOutput\BinLogs


3 changes: 1 addition & 2 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0

- name: Build Source
run: .\Build-All.ps1
run: .\Build-All.ps1 -FullInit

- name: Publish Artifacts
uses: actions/upload-artifact@v4
Expand Down
11 changes: 5 additions & 6 deletions Build-All.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
.PARAMETER Configuration
This sets the build configuration to use, default is "Release" though for inner loop development this may be set to "Debug"

.PARAMETER AllowVsPreReleases
Switch to enable use of Visual Studio Pre-Release versions. This is NEVER enabled for official production builds, however it is
useful when adding support for new versions during the pre-release stages.

.PARAMETER ForceClean
Forces a complete clean (Recursive delete of the build output)

Expand Down Expand Up @@ -39,6 +35,9 @@ Param(
[System.String]$BuildMode = 'All'
)

$ErrorActionPreference = "Stop"
$InformationPreference = "Continue"

Push-Location $PSScriptRoot
$oldPath = $env:Path
try
Expand Down Expand Up @@ -67,12 +66,12 @@ try

if($BuildSource)
{
.\Build-Source.ps1
.\Build-Source.ps1 -Configuration:$Configuration
}

if($BuildDocs)
{
.\Build-Docs.ps1
.\Build-Docs.ps1 -Configuration:$Configuration
}
}
catch
Expand Down
23 changes: 9 additions & 14 deletions Build-Docs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
.PARAMETER Configuration
This sets the build configuration to use, default is "Release" though for inner loop development this may be set to "Debug"

.PARAMETER AllowVsPreReleases
Switch to enable use of Visual Studio Pre-Release versions. This is NEVER enabled for official production builds, however it is
useful when adding support for new versions during the pre-release stages.

.PARAMETER FullInit
Performs a full initialization. A full initialization includes forcing a re-capture of the time stamp for local builds
as well as writes details of the initialization to the information and verbose streams.
Expand Down Expand Up @@ -54,7 +50,9 @@ function Get-FullBuildNumber
# build number is used for the docs generation.

# generate the CurrentVersionInfo.json file
Invoke-DotNet build ./BuildVersion.msbuildproj | Out-Null
Write-Information 'Generating CurrentVersionInfo.json'

Invoke-External dotnet build ./BuildVersion.msbuildproj | Out-Null

# Read in the generated JSON for use in PS
$versionInfo = Get-Content ./CurrentVersionInfo.json | ConvertFrom-Json -AsHashTable
Expand All @@ -73,15 +71,12 @@ try
. ./repo-buildutils.ps1

$buildInfo = Initialize-BuildEnvironment -FullInit:$FullInit
$msBuildPropertyList = ConvertTo-PropertyList @{
Configuration = $Configuration
}

# make sure the supported tool is installed.
Invoke-DotNet tool install --global docfx --version $docFXToolVersion | Out-Null
Invoke-External dotnet tool install --global docfx --version $docFXToolVersion | Out-Null

$docsOutputPath = $buildInfo['DocsOutputPath']
Write-Verbose "Docs OutputPath: $docsOutputPath"
Write-Information "Docs OutputPath: $docsOutputPath"

if(!$ServeDocs)
{
Expand All @@ -97,7 +92,7 @@ try
}

Write-Information "Cloning Docs repository"
Invoke-Git clone $buildInfo['OfficialGitRemoteUrl'] -b gh-pages $docsOutputPath -q
Invoke-External git clone $buildInfo['OfficialGitRemoteUrl'] -b gh-pages $docsOutputPath -q
}

# Delete everything in the docs output except the git folder so the result of applying changes
Expand All @@ -106,7 +101,7 @@ try
Get-ChildItem -Path $docsOutputPath -Exclude '.git' | remove-item -Recurse -Force -ProgressAction SilentlyContinue

# Create a file to disable the default GitHub Pages use of JEKYLL as this uses docfx to generate the final
# HTML. [It is a least theoretically plausible that JEKYLL could handle some/all of the metadata files produced
# HTML. [It is at least theoretically plausible that JEKYLL could handle some/all of the metadata files produced
# by DOCFX but it is not clear how much of the "build" stage would be lost if ONLY the metadata phase was used.
# Thus, for now, this uses the docfx build phase.]
"$([DateTime]::UtcNow.ToString('o'))" | Out-File -Path (Join-Path $docsOutputPath '.nojekyll')
Expand All @@ -116,7 +111,7 @@ try
try
{
Write-Information "Building docs [FullBuildNumber=$fullBuildNumber]"
Invoke-DocFX -m _buildVersion=$fullBuildNumber -o $docsOutputPath --warningsAsErrors
Invoke-External docfx '-m' _buildVersion=$fullBuildNumber '-o' $docsOutputPath
}
finally
{
Expand All @@ -130,7 +125,7 @@ try

if($ShowDocs)
{
Invoke-DocFx serve --open-browser $docsOutputPath
Invoke-External docfx serve '--open-browser' $docsOutputPath
}
}
catch
Expand Down
1 change: 1 addition & 0 deletions BuildVersion.msbuildproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</Target>

<Target Condition="'$(__InRestore)'!='true'" Name="AlwaysRun" BeforeTargets="AfterBuild">
<Error Condition="'$(FullBuildNumber)'==''" Text="FullBuildNumber not available!"/>
<Message Importance="normal" Text=" BuildTime: $(BuildTime)"/>
<Message Importance="normal" Text=" FullBuildNumber: $(FullBuildNumber)"/>
<Message Importance="normal" Text=" BuildMajor: $(BuildMajor)"/>
Expand Down
2 changes: 1 addition & 1 deletion BuildVersion.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<BuildVersionData
BuildMajor = "20"
BuildMinor = "1"
BuildPatch = "1"
BuildPatch = "3"
PreReleaseName = "alpha"
/>
7 changes: 7 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
<!--<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>-->
</PropertyGroup>
<Choose>
<!-- Apply standard properties to special build projects -->
<When Condition="'$(MSBuildProjectExtension)'=='.msbuildproj' and '$(DisableDirProps)'!='true'">
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
</When>

<!-- Apply standard properties for all C# projects -->
<When Condition="'$(MSBuildProjectExtension)'=='.csproj' and '$(DisableDirProps)'!='true'">
<PropertyGroup>
Expand Down
14 changes: 14 additions & 0 deletions IgnoredWords.dic
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ABI
Addr
alloca
anonymize
antlr
api
app
apps
Expand All @@ -12,22 +13,27 @@ Attribs
AttributeSet
baz
binaryop
binlogs
binop
bitcode
Blinky
blockdiag
blog
bool
buildbinoutput
buildtransitive
builtinop
byref
byval
cibuild
Cmp
Config
const
contentfiles
Contributors
crlf
csharp
csproj
de
defacto
dllimport
Expand All @@ -45,6 +51,7 @@ func
gh
github
Globalization
Hashtable
Identifier
inline
inlined
Expand All @@ -56,25 +63,31 @@ llvm
llvmversion
LValue
marshalling
memcopy
metadata
Mips
msbuild
msg
nav
noinline
nounwind
nullability
Nullable
optimizenone
pages
paren
perf
pointee
Pre
proj
readonly
refactor
repl
repo
RMW
runtimes
RValue
src
struct
structs
Subrange
Expand All @@ -89,6 +102,7 @@ undiscoverable
userdefinedop
Users
usings
utils
vcxproj
versioned
versioning
Expand Down
2 changes: 1 addition & 1 deletion Invoke-UnitTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ try
Push-Location $BuildInfo["SrcRootPath"]
try
{
Invoke-External dotnet test Ubiquity.NET.Llvm.slnx '-tl:off' '--logger:trx' '--no-build' '-s' '.\x64.runsettings'
Invoke-External dotnet test Ubiquity.NET.Llvm.slnx '-c' $Configuration '-tl:off' '--logger:trx' '--no-build' '-s' '.\x64.runsettings'
}
finally
{
Expand Down
4 changes: 4 additions & 0 deletions PsModules/CommonBuild/CommonBuild.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ FunctionsToExport = @(
'Assert-CMakeList',
'Assert-OfficialGitRemote',
'Get-BuildVersionTag',
'Assert-IsCMakeConfig',
'New-CMakeConfig',
'Invoke-GenerateCMakeConfig',
'Build-CmakeConfig',
Expand All @@ -74,7 +75,10 @@ FunctionsToExport = @(
'Expand-ArchiveStream',
'Expand-StreamFromUri',
'Find-OnPath',
'Get-BuildVersionTag',
'Get-CurrentBuildKind',
'Get-GitRemotes',
'Get-GitRemoteName',
'Get-GitHubReleases',
'Get-GitHubTaggedRelease',
'Initialize-CommonBuildEnvironment',
Expand Down
14 changes: 11 additions & 3 deletions PsModules/CommonBuild/CommonBuild.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This script is a generalized script entry point for module support that is easily cloned for other modules
# and is independent of the module's functionality.
# and is independent of the module's functionality. This is invocable using the PS module name qualifier
# syntax `<ModuleName>/Get-ExportedFunctionNames`

function Get-ExportedFunctionNames
{
Expand All @@ -26,15 +27,15 @@ function Get-ExportedFunctionNames
}
else
{
Write-Information "found non-standard function mame '$name' in '$script'"
Write-Information "found non-standard function name '$name' in '$script'"
}
}
}

return $retVal
}

# Exported from the module but NOT from the PSD1 list. Instead, you should use module qualifed name
# Exported from the module but NOT from the PSD1 list. Instead, you should use module qualified name
# to access this function. It is only useful when updating the set of public functions exported
# to generate the required 'FunctionsToExport' property of the PSD1 file.
function Get-FunctionsToExport
Expand Down Expand Up @@ -75,6 +76,13 @@ function Get-FunctionsToExport
return $bldr.ToString()
}

# force preferences to what is expected
# see: https://github.com/PowerShell/PowerShell/issues/4568
# there is NO good solution to this beyond setting a global preference OR specifying the preference on EVERY CALL
# '`tis a silly thing' - The whole PS preferences settings is a nightmarish mess.
$InformationPreference = 'Continue'
$ErrorInformationPreference = 'Stop'

# get public/Private function definition files
$Public = @( Get-ChildItem -Path (Join-path $PSScriptroot 'Public' '*.ps1') -ErrorAction SilentlyContinue )
$Private = @( Get-ChildItem -Path (Join-path $PSScriptroot 'Private' '*.ps1') -ErrorAction SilentlyContinue )
Expand Down
1 change: 1 addition & 0 deletions PsModules/CommonBuild/Debug-Module.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This script is used for debugging the module when using the
# [Powershell Tools for VisualStudio 2022](https://marketplace.visualstudio.com/items?itemName=AdamRDriscoll.PowerShellToolsVS2022)
# It is MOST useful for computing and reporting the set of functions to export from this module for the PSD1 file.
Import-Module $PSScriptRoot\CommonBuild.psd1 -Force -Verbose
CommonBuild\Get-FunctionsToExport

Expand Down
Loading
Loading