mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00

`-Z patchable-function-entry` works like `-fpatchable-function-entry` on clang/gcc. The arguments are total nop count and function offset. See MCP rust-lang/compiler-team#704
9 lines
251 B
Rust
9 lines
251 B
Rust
// compile-flags: -Z patchable-function-entry=15,10
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#[no_mangle]
|
|
pub fn foo() {}
|
|
// CHECK: @foo() unnamed_addr #0
|
|
// CHECK: attributes #0 = { {{.*}}"patchable-function-entry"="5"{{.*}}"patchable-function-prefix"="10" {{.*}} }
|