[PR #16056] Fix CFG on our static-lib-only DLL projects #30819

Open
opened 2026-01-31 09:43:11 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16056

State: closed
Merged: Yes


Control Flow Guard requires both linker and compiler flags.

It turns out that the MSVC build rules determine whether to link with CFG based on whether it compiled anything with CFG.

It also turns out that when you don't compile anything (such as in our DLL projects that only consume a static library!), the build rules can't guess whether to link with CFG.

Whoops.
We need to force it.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/16056 **State:** closed **Merged:** Yes --- Control Flow Guard requires both linker and compiler flags. It turns out that the MSVC build rules determine whether to _link_ with CFG based on whether it compiled anything with CFG. It also turns out that when you don't compile anything (such as in our DLL projects that only consume a static library!), the build rules can't guess whether to link with CFG. Whoops. We need to force it.
claunia added the pull-request label 2026-01-31 09:43:11 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30819