Skip to content

Commit b4fd74a

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
Misc fixes
1 parent 007090d commit b4fd74a

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

.cargo/config.toml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,31 @@ POWERSHELL = { index = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/
88
[registry]
99
global-credential-providers = ["cargo:token"]
1010

11-
# Enable Control Flow Guard (needed for OneBranch's post-build analysis).
11+
# Avoid linking with vcruntime140.dll by statically linking everything,
12+
# and then explicitly linking with ucrtbase.dll dynamically.
13+
# We do this, because vcruntime140.dll is an optional Windows component.
1214
[target.x86_64-pc-windows-msvc]
13-
rustflags = ["-Ccontrol-flow-guard", "-Ctarget-feature=+crt-static", "-Clink-args=/DYNAMICBASE /CETCOMPAT"]
15+
rustflags = [
16+
"-CControl-flow-guard",
17+
"-Ctarget-feature=+crt-static",
18+
"-Clink-args=/DEFAULTLIB:ucrt.lib",
19+
"-Clink-args=/NODEFAULTLIB:vcruntime.lib",
20+
"-Clink-args=/NODEFAULTLIB:msvcrt.lib",
21+
"-Clink-args=/NODEFAULTLIB:libucrt.lib",
22+
"-Clink-args=/DYNAMICBASE",
23+
"-Clink-args=/CETCOMPAT"
24+
]
1425

1526
[target.aarch64-windows-msvc]
16-
rustflags = ["-Ccontrol-flow-guard", "-Ctarget-feature=+crt-static", "-Clink-args=/DYNAMICBASE"]
27+
rustflags = [
28+
"-CControl-flow-guard",
29+
"-Ctarget-feature=+crt-static",
30+
"-Clink-args=/DEFAULTLIB:ucrt.lib",
31+
"-Clink-args=/NODEFAULTLIB:vcruntime.lib",
32+
"-Clink-args=/NODEFAULTLIB:msvcrt.lib",
33+
"-Clink-args=/NODEFAULTLIB:libucrt.lib",
34+
"-Clink-args=/DYNAMICBASE"
35+
]
1736

1837
# The following is only needed for release builds
1938
[source.crates-io]

.github/ISSUE_TEMPLATE/Feature_Request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
new feature would solve. Try formulating it in user story style
1515
(if applicable).
1616
placeholder: >-
17-
'As a user I want X so that Y...' with X being the being the
17+
'As a user I want X so that Y...' with X being the
1818
action and Y being the value of the action.
1919
validations:
2020
required: true

.pipelines/DSC-Official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ extends:
585585
throw "PackageVersion variable is not set. Cannot proceed with publishing Universal Package."
586586
}
587587
Write-Verbose -Verbose "Universal Package version: $packageVersion"
588-
az artifacts universal publish --organization https://dev.azure.com//PowerShell --project PowerShell --feed PowerShell-Universal --name microsoft.dsc-linux --version $packageVersion --description "Microsoft Desired State Configuration (DSC) - Universal Package" --path "$(LinuxDirectory)" --scope project --verbose
588+
az artifacts universal publish --organization https://dev.azure.com/PowerShell --project PowerShell --feed PowerShell-Universal --name microsoft.dsc-linux --version $packageVersion --description "Microsoft Desired State Configuration (DSC) - Universal Package" --path "$(LinuxDirectory)" --scope project --verbose
589589
condition: succeeded()
590590

591591
- task: AzureCLI@2

build.ps1

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -182,20 +182,15 @@ if ($null -ne $packageType) {
182182
throw "Azure CLI not found"
183183
}
184184

185-
if ($null -ne (Get-Command az -ErrorAction Ignore)) {
186-
Write-Host "Getting token"
187-
$accessToken = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
188-
if ($LASTEXITCODE -ne 0) {
189-
Write-Warning "Failed to get access token, use 'az login' first, or use '-useCratesIO' to use crates.io. Proceeding with anonymous access."
190-
} else {
191-
$header = "Bearer $accessToken"
192-
$env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
193-
$env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
194-
$env:CARGO_REGISTRIES_POWERSHELL_INDEX = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell~force-auth/Cargo/index/"
195-
}
196-
}
197-
else {
198-
Write-Warning "Azure CLI not found, proceeding with anonymous access."
185+
Write-Host "Getting token"
186+
$accessToken = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
187+
if ($LASTEXITCODE -ne 0) {
188+
Write-Warning "Failed to get access token, use 'az login' first, or use '-useCratesIO' to use crates.io. Proceeding with anonymous access."
189+
} else {
190+
$header = "Bearer $accessToken"
191+
$env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
192+
$env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
193+
$env:CARGO_REGISTRIES_POWERSHELL_INDEX = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell~force-auth/Cargo/index/"
199194
}
200195
}
201196
} else {

0 commit comments

Comments
 (0)