rust/tests/ui/instrument-xray/target-not-supported.rs
Oleksii Lozovskyi 3561dc948c Emit an error if -Z instrument-xray is not supported
This is somewhat important because LLVM enables the pass based on
target architecture, but support by the target OS also matters.

For example, XRay attributes are processed by codegen for macOS
targets, but Apple linker fails to process relocations in XRay
data sections, so the feature as a whole is not supported there
for the time being.
2023-02-09 12:29:40 +09:00

10 lines
303 B
Rust

// Verifies that `-Z instrument-xray` cannot be used with unsupported targets,
//
// needs-llvm-components: x86
// compile-flags: -Z instrument-xray --target x86_64-apple-darwin
// error-pattern: error: XRay instrumentation is not supported for this target
#![feature(no_core)]
#![no_core]
#![no_main]