about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/attributes.rs
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2023-05-28 22:03:06 -0400
committerBen Kimock <kimockb@gmail.com>2023-05-28 22:03:06 -0400
commitfe69acfdf0592e15bc0df3caffd922748d0ab70e (patch)
tree8541126d2eb309f23bad2a88fe8d20df45db4cd1 /compiler/rustc_codegen_llvm/src/attributes.rs
parentc5013ce996ff018d8c1de89c6505a76d2a83cfe8 (diff)
parent2f65aac667302849407fe677cc34078300b57eee (diff)
downloadrust-fe69acfdf0592e15bc0df3caffd922748d0ab70e.tar.gz
rust-fe69acfdf0592e15bc0df3caffd922748d0ab70e.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/attributes.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs
index 651d644ebb6..6d00464e0a0 100644
--- a/compiler/rustc_codegen_llvm/src/attributes.rs
+++ b/compiler/rustc_codegen_llvm/src/attributes.rs
@@ -88,6 +88,9 @@ pub fn sanitize_attrs<'ll>(
 
         attrs.push(llvm::AttributeKind::SanitizeMemTag.create_attr(cx.llcx));
     }
+    if enabled.contains(SanitizerSet::SAFESTACK) {
+        attrs.push(llvm::AttributeKind::SanitizeSafeStack.create_attr(cx.llcx));
+    }
     attrs
 }