Skip to content

Commit 614a7f1

Browse files
authored
Merge pull request #1242 from SteveL-MSFT/bot-fixes
Update Appx manifest with new cap and fix statically linking to vcruntime
2 parents c31ec1c + 3d5ae86 commit 614a7f1

File tree

15 files changed

+36
-48
lines changed

15 files changed

+36
-48
lines changed

.cargo/config.toml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,33 @@ 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+
"-Dwarnings"
25+
]
1426

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

1839
# The following is only needed for release builds
1940
[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

Cargo.lock

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,6 @@ ipnetwork = { version = "0.21" }
210210
# build-only dependencies
211211
# dsc-lib, dsc-lib-registry, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config
212212
cc = { version = "1.2" }
213-
# registry, dsc-lib-registry
214-
static_vcruntime = { version = "2.0" }
215213

216214
# test-only dependencies
217215
# dsc-lib-jsonschema

archive/ntreg/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,3 @@ thiserror = "1.0"
2929

3030
[target.'cfg(onecore)'.dependencies]
3131
pal = { path = "../pal" }
32-
33-
[build-dependencies]
34-
static_vcruntime = "2.0"

archive/ntreg/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ fn main() {
77
println!("cargo:rerun-if-changed=build.rs");
88
println!("cargo:rustc-link-lib=onecore_apiset");
99
println!("cargo:rustc-link-lib=onecoreuap_apiset");
10-
static_vcruntime::metabuild();
1110
}
1211

1312
#[cfg(not(onecore))]
1413
fn main() {
1514
println!("cargo:rerun-if-changed=build.rs");
16-
static_vcruntime::metabuild();
1715
}

archive/registry/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,3 @@ serde_json = { version = "1.0", features = ["preserve_order"] }
2424

2525
[target.'cfg(onecore)'.dependencies]
2626
pal = { path = "../pal" }
27-
28-
[build-dependencies]
29-
static_vcruntime = "2.0"

archive/registry/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ fn main() {
77
println!("cargo:rerun-if-changed=build.rs");
88
println!("cargo:rustc-link-lib=onecore_apiset");
99
println!("cargo:rustc-link-lib=onecoreuap_apiset");
10-
static_vcruntime::metabuild();
1110
}
1211

1312
#[cfg(not(onecore))]
1413
fn main() {
1514
// Prevent this build script from rerunning unnecessarily.
1615
println!("cargo:rerun-if-changed=build.rs");
17-
static_vcruntime::metabuild();
1816
}

build.helpers.psm1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,6 @@ function Set-RustEnvironment {
750750
Write-Verbose "Caching current rust environment variables..."
751751
[hashtable]$currentRustEnvironment = Get-RustEnvironment
752752

753-
Write-Verbose "Setting RUSTFLAGS to '-Dwarnings'"
754-
$env:RUSTFLAGS='-Dwarnings'
755-
756753
if ($VerbosePreference -eq 'Continue') {
757754
Write-Verbose "Running verbose, setting RUSTC_LOG "
758755
# $env:RUSTC_LOG='rustc_codegen_ssa::back::link=info'

0 commit comments

Comments
 (0)