[clang] tune the default stack protector level as SSPOn on Windows platform (PR #107043)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 2 20:14:16 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: None (wenqinI)
<details>
<summary>Changes</summary>
This commit tune the default stack protector level on Windows platform, it could improve performance and reduce binary size, will provide more details in related issue later.
---
Full diff: https://github.com/llvm/llvm-project/pull/107043.diff
1 Files Affected:
- (modified) clang/lib/Driver/ToolChains/Clang.cpp (+1-1)
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index df86941950e46e..d94791f8621197 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -8326,7 +8326,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
if (!isNVPTX && Args.hasFlag(options::OPT__SLASH_GS, options::OPT__SLASH_GS_,
/*Default=*/true)) {
CmdArgs.push_back("-stack-protector");
- CmdArgs.push_back(Args.MakeArgString(Twine(LangOptions::SSPStrong)));
+ CmdArgs.push_back(Args.MakeArgString(Twine(LangOptions::SSPOn)));
}
const Driver &D = getToolChain().getDriver();
``````````
</details>
https://github.com/llvm/llvm-project/pull/107043
More information about the cfe-commits
mailing list