Skip to content

Commit

Permalink
okay that's what i get for blind copypasta
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii committed Jun 1, 2024
1 parent a0ad35e commit 7654722
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
11 changes: 6 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# -Ccontrol-flow-guard: Enable Control Flow Guard, needed for OneBranch's post-build analysis (https://learn.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard).
[target.'cfg(target_os = "windows")']
rustflags = [
"-Dwarnings",
"-Ccontrol-flow-guard",
"-Ctarget-feature=+crt-static",
"-Clink-args=/DEFAULTLIB:ucrt.lib /NODEFAULTLIB:vcruntime.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:rpcrt4.lib"
"-Clink-args=/DEFAULTLIB:ucrt.lib /NODEFAULTLIB:vcruntime.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libucrt.lib"
]

# # This fixes the following linker error on x86:
# # error LNK2019: unresolved external symbol _NdrClientCall4 referenced in function ...
# [target.'cfg(all(target_os = "windows", target_arch = "x86"))']
# rustflags = ["-Clink-args=/DEFAULTLIB:rpcrt4.lib"]
# This fixes the following linker error on x86:
# error LNK2019: unresolved external symbol _NdrClientCall4 referenced in function ...
[target.'cfg(all(target_os = "windows", target_arch = "x86"))']
rustflags = ["-Clink-args=/DEFAULTLIB:rpcrt4.lib"]

# -Clink-args=/DYNAMICBASE /CETCOMPAT: Enable "shadow stack" (https://learn.microsoft.com/en-us/cpp/build/reference/cetcompat)
[target.'cfg(all(target_os = "windows", any(target_arch = "x86", target_arch = "x86_64")))']
Expand Down
6 changes: 0 additions & 6 deletions .github/actions/fix-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,12 @@ runs:
"i686*"
{
"${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x86" >> $env:GITHUB_PATH
"${env:ProgramFiles(x86)}\Windows Kits\10\Lib\10.0.22000.0\um\x86" >> $env:GITHUB_PATH
((Resolve-Path "$vs_root\VC\Tools\MSVC\*\bin\Hostx86\x86")
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
}
"x86_64*"
{
"${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22000.0\x64" >> $env:GITHUB_PATH
"${env:ProgramFiles(x86)}\Windows Kits\10\Lib\10.0.22000.0\um\x64" >> $env:GITHUB_PATH
((Resolve-Path "$vs_root\VC\Tools\MSVC\*\bin\Hostx64\x64")
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
branches:
- main

env:
RUSTFLAGS: -Dwarnings

jobs:
check:
runs-on: windows-2022
Expand Down

0 comments on commit 7654722

Please sign in to comment.