From 1b143e34a81ad55a74033961ea16bfab542f032f Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Fri, 29 Sep 2023 13:25:01 -0500 Subject: [PATCH] Fix CFG on our static-lib-only DLL projects (#16056) 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. --- src/common.build.pre.props | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common.build.pre.props b/src/common.build.pre.props index 1cf31b37e44..9404c24c4bd 100644 --- a/src/common.build.pre.props +++ b/src/common.build.pre.props @@ -101,6 +101,13 @@ x64 true false + + true