Files
rust/compiler/rustc_codegen_llvm/src
Stuart Cook 3d102a7812 Rollup merge of #150893 - ZuseZ4:move-un-register-lib, r=oli-obk
offload: move (un)register lib into global_ctors

Right now we initialize the openmp/offload runtime before every single offload call, and tear it down directly afterwards.
What we should rather do is initialize it once in the binary startup code, and tear it down at the end of the binary execution. Here I implement these changes.

Together, our generated IR has a lot less usage of globals, which in turn simplifies the refactoring in https://github.com/rust-lang/rust/pull/150683, where I introduce a new variant of our offload intrinsic.

r? oli-obk
2026-01-28 19:03:51 +11:00
..
2025-11-28 19:30:39 +00:00
2025-11-11 18:34:47 -05:00
2026-01-20 14:47:09 +01:00
2025-12-16 11:00:12 +00:00