-
Notifications
You must be signed in to change notification settings - Fork 90
Generate QIR during pipeline #522
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,17 @@ | |
| # Licensed under the MIT License. | ||
|
|
||
| if ($Env:ENABLE_QIRRUNTIME -eq "true") { | ||
| Write-Host "##[info]Compile Q# Projects into QIR" | ||
| $qirStaticPath = Join-Path $PSScriptRoot test QIR-static qsharp | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Beyond the scope of this PR, but we may want to consider in the future making this rely on PowerShell cmdlet functions that wrap |
||
| dotnet build $qirStaticPath -c $Env:BUILD_CONFIGURATION -v $Env:BUILD_VERBOSITY | ||
| if ($LastExitCode -ne 0) { | ||
| Write-Host "##vso[task.logissue type=error;]Failed to compile Q# project at '$qirStaticPath' into QIR." | ||
| return | ||
| } | ||
| Copy-Item -Path (Join-Path $qirStaticPath qir *.ll) -Destination (Split-Path $qirStaticPath -Parent) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we perhaps delete the currently generated QIR files that are in the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it would be good to delete the one file that is now being generated (the second file was manually authored and covers functionality not supported by Q# but present in QIR spec)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change does remove that file. |
||
| # Also copy to drops so it ends up in build artifacts, for easier post-build debugging. | ||
| Copy-Item -Path (Join-Path $qirStaticPath qir *.ll) -Destination $Env:DROPS_DIR | ||
|
|
||
| Write-Host "##[info]Build QIR Runtime" | ||
| $oldCC = $env:CC | ||
| $oldCXX = $env:CXX | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.