From 2e6b57541dc28cdd954b1ce2300b88ccc5c29d5c Mon Sep 17 00:00:00 2001 From: Paul Menage Date: Mon, 9 Oct 2023 02:22:14 -0700 Subject: Add -Z llvm_module_flag Allow adding values to the `!llvm.module.flags` metadata for a generated module. The syntax is `-Z llvm_module_flag=:::` Currently only u32 values are supported but the type is required to be specified for forward compatibility. The `behavior` element must match one of the named LLVM metadata behaviors.viors. This flag is expected to be perma-unstable. --- compiler/rustc_interface/src/tests.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_interface/src') diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index d3081695523..8be23f8e4f3 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -771,6 +771,7 @@ fn test_unstable_options_tracking_hash() { tracked!(instrument_xray, Some(InstrumentXRay::default())); tracked!(link_directives, false); tracked!(link_only, true); + tracked!(llvm_module_flag, vec![("bar".to_string(), 123, "max".to_string())]); tracked!(llvm_plugins, vec![String::from("plugin_name")]); tracked!(location_detail, LocationDetail { file: true, line: false, column: false }); tracked!(maximal_hir_to_mir_coverage, true); -- cgit 1.4.1-3-g733a5