From b14b4ec70382a57faf2d663afc3ca1936bfd20de Mon Sep 17 00:00:00 2001 From: A-Satti <104173224+A-Satti@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:52:21 -0800 Subject: [PATCH] Restore Qspectre flag (#23060) Restore a removed Qspectre flag and update comment ### Motivation and Context Adjustment for PR https://github.com/microsoft/onnxruntime/commit/f5293d253c2ccc7a96c9ec791b91e0035359f45f --- tools/ci_build/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index fdc85e2caf..6ee37b8b05 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -1559,6 +1559,9 @@ def generate_build_tree( # The "/profile" flag implies "/DEBUG:FULL /DEBUGTYPE:cv,fixup /OPT:REF /OPT:NOICF /INCREMENTAL:NO /FIXED:NO". We set it for satisfying a Microsoft internal compliance requirement. External users # do not need to have it. ldflags = ["/profile", "/DYNAMICBASE"] + # Address Sanitizer libs do not have a Qspectre version. So they two cannot be both enabled. + if not args.enable_address_sanitizer: + cflags += ["/Qspectre"] if config == "Release": cflags += ["/O2", "/Ob2", "/DNDEBUG"] elif config == "RelWithDebInfo":