Skip to content

Commit

Permalink
[Build]Enable Control Flow Guard; required for MS binaries (microsoft…
Browse files Browse the repository at this point in the history
…#28910)

* Enable Control Flow Guard; it is a requirement for any MS binaries

As it says on the tin. Go go gadget VC!

* Disable CFG for CLR projects (boo)

* Disable E&C...

(cherry picked from commit f0c3f58)

* okay, stop being surgical and just whack it

* Revert "okay, stop being surgical and just whack it"

This reverts commit e4e10c6.

* Oh CLRSupport is a **property**
  • Loading branch information
DHowett committed Oct 4, 2023
1 parent a92443b commit 4eeba26
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Cpp.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<PreferredToolArchitecture Condition="'$(PROCESSOR_ARCHITECTURE)' == 'ARM64' or '$(PROCESSOR_ARCHITEW6432)' == 'ARM64'">arm64</PreferredToolArchitecture>
<VcpkgEnabled>false</VcpkgEnabled>
<ExternalIncludePath>$(MSBuildThisFileFullPath)\..\deps\;$(MSBuildThisFileFullPath)\..\packages\;$(ExternalIncludePath)</ExternalIncludePath>
<!-- Enable control flow guard for C++ projects that don't consume any C++ files -->
<!-- This covers the case where a .dll exports a .lib, but doesn't have any ClCompile entries. -->
<LinkControlFlowGuard>Guard</LinkControlFlowGuard>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
Expand All @@ -53,9 +56,12 @@
<ConformanceMode>false</ConformanceMode>
<TreatWarningAsError>true</TreatWarningAsError>
<LanguageStandard>stdcpplatest</LanguageStandard>
<BuildStlModules>false</BuildStlModules>
<BuildStlModules>false</BuildStlModules>
<AdditionalOptions>/await %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>

Check failure on line 61 in Cpp.Build.props

View workflow job for this annotation

GitHub Actions / Spell checking

`UNICODE` is not a recognized word. (unrecognized-spelling)
<!-- CLR + CFG are not compatible >:{ -->
<ControlFlowGuard Condition="'$(CLRSupport)' == ''">Guard</ControlFlowGuard>
<DebugInformationFormat Condition="'%(ControlFlowGuard)' == 'Guard'">ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down

1 comment on commit 4eeba26

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

Unrecognized words (89)
actioned
alignas
APPICON
Autofill
blockquote
checkbox
Checkboxes
CJK
combobox
Compat
Concat
Configurator
contextmenu
cron
CStr
DARKGRAY
DARKGREEN
DARKRED
decltype
dpi
draggable
dword
elif
endforeach
ERRORMESSAGE
figcaption
fullscreen
Grayscale
hanja
hfile
hyperlink
ifdef
ifndef
img
kbd
Lifecycle
LIGHTGRAY
LIGHTGREEN
LIGHTYELLOW
Linux
Llvm
moz
nand
nanother
napp
nbsp
noexcept
notin
nullptr
NWSE
Overridable
placeholders
PVOID
rgb
rgba
ringbuffer
Rtc
Rtl
sbyte
searchbox
SKYBLUE
sqlite
stdlib
strikethrough
structs
syslog
systemd
Tahoma
tapp
tbody
tbutton
tdisplay
textbox
thead
tlocation
toolbar
toplevel
tprimary
tweakme
tworking
typeof
unicode
upvote
uuid
vmax
vmin
vscode
wchar
xlink
Previously acknowledged words that are now absent adio anges AUTHN AUTHZ Bitmaps Blockquotes deref DPIs etstat hread imeutil ingbuffer onstd plugins rgbs Seperate spec'ing Stroe TApp uninstalling weakme 🫥
To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:quyenvsp/PowerToys.git repository
on the main branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/quyenvsp/PowerToys/actions/runs/6408519341/attempts/1'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (2282) from .github/actions/spell-check/expect.txt and unrecognized words (89)

Dictionary Entries Covers Uniquely
cspell:php/dict/php.txt 1689 38 10
cspell:typescript/dict/typescript.txt 1098 24 7
cspell:dotnet/dict/dotnet.txt 405 17 6
cspell:csharp/csharp.txt 32 11 6
cspell:python/src/python/python-lib.txt 2417 36 5

Consider adding them (in .github/workflows/spelling2.yml) for uses: check-spelling/check-spelling@v0.0.22 in its with:

      with:
        extra_dictionaries:
          cspell:php/dict/php.txt
          cspell:typescript/dict/typescript.txt
          cspell:dotnet/dict/dotnet.txt
          cspell:csharp/csharp.txt
          cspell:python/src/python/python-lib.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling2.yml) for uses: check-spelling/check-spelling@v0.0.22 in its with:

check_extra_dictionaries: ''
Pattern suggestions ✂️ (1)

You could add these patterns to .github/actions/spell-check/patterns.txt:

# Automatically suggested patterns
# hit-count: 1 file-count: 1
# ssh
(?:ssh-\S+|-nistp256) [-a-zA-Z=;:/0-9+]{12,}

Errors (4)

See the 📜action log or 📝 job summary for details.

❌ Errors Count
ℹ️ candidate-pattern 1
❌ check-file-path 8
❌ dictionary-not-found 3
❌ forbidden-pattern 1

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Please sign in to comment.