Skip to content

Commit

Permalink
Rollup merge of rust-lang#132965 - mati865:cfguard-gnullvm, r=wesleyw…
Browse files Browse the repository at this point in the history
…iser

allow CFGuard on windows-gnullvm

No unit tests because of rust-lang#132278
  • Loading branch information
GuillaumeGomez authored Nov 13, 2024
2 parents bd91033 + 811c1db commit 72a30db
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 72a30db

Please sign in to comment.