Skip to content

Commit

Permalink
Auto merge of rust-lang#132965 - mati865:cfguard-gnullvm, r=wesleywiser
Browse files Browse the repository at this point in the history
allow CFGuard on windows-gnullvm

No unit tests because of rust-lang#132278
  • Loading branch information
bors committed Nov 15, 2024
2 parents e84902d + 811c1db commit 3bc6916
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,12 @@ pub(crate) unsafe fn create_module<'ll>(
}
}

// Control Flow Guard is currently only supported by the MSVC linker on Windows.
if sess.target.is_like_msvc {
// Control Flow Guard is currently only supported by MSVC and LLVM on Windows.
if sess.target.is_like_msvc
|| (sess.target.options.os == "windows"
&& sess.target.options.env == "gnu"
&& sess.target.options.abi == "llvm")
{
match sess.opts.cg.control_flow_guard {
CFGuard::Disabled => {}
CFGuard::NoChecks => {
Expand Down

0 comments on commit 3bc6916

Please sign in to comment.