From 82670210793f641d9e875395b290e00e885a94fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Tue, 16 Jan 2024 00:04:49 +0100 Subject: [PATCH] test with ALL THE FLAGS --- src/flags.rs | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 170 insertions(+), 2 deletions(-) diff --git a/src/flags.rs b/src/flags.rs index 86c9800..2843213 100644 --- a/src/flags.rs +++ b/src/flags.rs @@ -6,10 +6,14 @@ use once_cell::sync::Lazy; //&q["-Zcrate-attr=feature(generic_associated_types)"], // git grep -o "unstable(feature = \"[A-Za-z_-]*" | grep -o "\ .*$" | grep -o "\".*" | sed s/\"// | sort -n | uniq | grep "...." +// cat compiler/rustc_feature/src/unstable.rs | grep "(unstable,.*, \"" | sed s/,//g | awk '{print "\"-Zcrate-attr=feature("$2")\","}' + static DEFAULT_RUSTFLAGS: &[&[&str]] = &[ // all allow-by-default lints, split into two because otherwise the get_flag_combinations would eat all ram - // for i in `rustc -Whelp | grep " allow" | sed -e "s/\ \ \ //g" | sed -e "s/\ \ /\ /g" | sed -e "s/\ \ /\ /g" | sed -e "s/^\ //" | cut -d' ' -f1` ; do ; echo "\"-W${i}\","; done + /* + for i in `rustc -Whelp | grep " allow" | sed -e "s/\ \ \ //g" | sed -e "s/\ \ /\ /g" | sed -e "s/\ \ /\ /g" | sed -e "s/^\ //" | cut -d' ' -f1` ; do ; echo "\"-W${i}\","; done + */ &[ // lints #1 "-Zunstable-options", @@ -216,8 +220,8 @@ static DEFAULT_RUSTFLAGS: &[&[&str]] = &[ "-Copt-level=3",*/ "-Zmir-opt-level=5", "-Zvalidate-mir", - "--edition=2024", "-Zunstable-options", + "--edition=2024", "-Zinline-mir=yes", "-Zinline-mir-threshold=20", "-Zcrate-attr=feature(adt_const_params)", @@ -253,6 +257,170 @@ static DEFAULT_RUSTFLAGS: &[&[&str]] = &[ // also this might be the only flag for default run that forces actual codegen &["INCR_COMP"], // &["-Ztrait-solver=next", "-Zvalidate-mir"], + &[ + "-Zcrate-attr=feature(abi_vectorcall)", + "-Zcrate-attr=feature(anonymous_lifetime_in_impl_trait)", + "-Zcrate-attr=feature(generic_assert)", + "-Zcrate-attr=feature(lifetime_capture_rules_2024)", + "-Zcrate-attr=feature(link_cfg)", + "-Zcrate-attr=feature(multiple_supertrait_upcastable)", + "-Zcrate-attr=feature(with_negative_coherence)", + "-Zcrate-attr=feature(auto_traits)", + "-Zcrate-attr=feature(box_patterns)", + "-Zcrate-attr=feature(doc_notable_trait)", + "-Zcrate-attr=feature(dropck_eyepatch)", + "-Zcrate-attr=feature(fundamental)", + "-Zcrate-attr=feature(linkage)", + "-Zcrate-attr=feature(rustc_private)", + "-Zcrate-attr=feature(rustdoc_missing_doc_code_examples)", + "-Zcrate-attr=feature(start)", + "-Zcrate-attr=feature(structural_match)", + "-Zcrate-attr=feature(unboxed_closures)", + "-Zcrate-attr=feature(aarch64_ver_target_feature)", + "-Zcrate-attr=feature(arm_target_feature)", + "-Zcrate-attr=feature(avx512_target_feature)", + "-Zcrate-attr=feature(bpf_target_feature)", + "-Zcrate-attr=feature(csky_target_feature)", + "-Zcrate-attr=feature(ermsb_target_feature)", + "-Zcrate-attr=feature(hexagon_target_feature)", + "-Zcrate-attr=feature(loongarch_target_feature)", + "-Zcrate-attr=feature(mips_target_feature)", + "-Zcrate-attr=feature(powerpc_target_feature)", + "-Zcrate-attr=feature(riscv_target_feature)", + "-Zcrate-attr=feature(rtm_target_feature)", + "-Zcrate-attr=feature(sse4a_target_feature)", + "-Zcrate-attr=feature(tbm_target_feature)", + "-Zcrate-attr=feature(wasm_target_feature)", + "-Zcrate-attr=feature(abi_amdgpu_kernel)", + "-Zcrate-attr=feature(abi_avr_interrupt)", + "-Zcrate-attr=feature(abi_c_cmse_nonsecure_call)", + "-Zcrate-attr=feature(abi_msp430_interrupt)", + "-Zcrate-attr=feature(abi_ptx)", + "-Zcrate-attr=feature(abi_riscv_interrupt)", + "-Zcrate-attr=feature(abi_x86_interrupt)", + "-Zcrate-attr=feature(alloc_error_handler)", + "-Zcrate-attr=feature(arbitrary_self_types)", + "-Zcrate-attr=feature(asm_const)", + "-Zcrate-attr=feature(asm_experimental_arch)", + "-Zcrate-attr=feature(asm_unwind)", + "-Zcrate-attr=feature(associated_const_equality)", + "-Zcrate-attr=feature(associated_type_bounds)", + "-Zcrate-attr=feature(associated_type_defaults)", + "-Zcrate-attr=feature(async_closure)", + "-Zcrate-attr=feature(async_fn_track_caller)", + "-Zcrate-attr=feature(async_for_loop)", + "-Zcrate-attr=feature(builtin_syntax)", + "-Zcrate-attr=feature(c_unwind)", + "-Zcrate-attr=feature(c_variadic)", + "-Zcrate-attr=feature(cfg_overflow_checks)", + "-Zcrate-attr=feature(cfg_relocation_model)", + "-Zcrate-attr=feature(cfg_sanitize)", + "-Zcrate-attr=feature(cfg_sanitizer_cfi)", + "-Zcrate-attr=feature(cfg_target_abi)", + "-Zcrate-attr=feature(cfg_target_compact)", + "-Zcrate-attr=feature(cfg_target_has_atomic)", + "-Zcrate-attr=feature(cfg_target_has_atomic_equal_alignment)", + "-Zcrate-attr=feature(cfg_target_thread_local)", + "-Zcrate-attr=feature(cfg_version)", + "-Zcrate-attr=feature(cfi_encoding)", + "-Zcrate-attr=feature(closure_lifetime_binder)", + "-Zcrate-attr=feature(closure_track_caller)", + "-Zcrate-attr=feature(cmse_nonsecure_entry)", + "-Zcrate-attr=feature(collapse_debuginfo)", + "-Zcrate-attr=feature(const_async_blocks)", + "-Zcrate-attr=feature(const_extern_fn)", + "-Zcrate-attr=feature(const_fn_floating_point_arithmetic)", + "-Zcrate-attr=feature(const_for)", + "-Zcrate-attr=feature(const_mut_refs)", + "-Zcrate-attr=feature(const_precise_live_drops)", + "-Zcrate-attr=feature(const_refs_to_cell)", + "-Zcrate-attr=feature(const_trait_impl)", + "-Zcrate-attr=feature(const_try)", + "-Zcrate-attr=feature(coroutine_clone)", + "-Zcrate-attr=feature(coroutines)", + "-Zcrate-attr=feature(coverage_attribute)", + "-Zcrate-attr=feature(custom_code_classes_in_docs)", + "-Zcrate-attr=feature(custom_inner_attributes)", + "-Zcrate-attr=feature(custom_test_frameworks)", + "-Zcrate-attr=feature(decl_macro)", + "-Zcrate-attr=feature(default_type_parameter_fallback)", + "-Zcrate-attr=feature(deprecated_safe)", + "-Zcrate-attr=feature(deprecated_suggestion)", + "-Zcrate-attr=feature(diagnostic_namespace)", + "-Zcrate-attr=feature(do_not_recommend)", + "-Zcrate-attr=feature(doc_auto_cfg)", + "-Zcrate-attr=feature(doc_cfg)", + "-Zcrate-attr=feature(doc_cfg_hide)", + "-Zcrate-attr=feature(doc_masked)", + "-Zcrate-attr=feature(effects)", + "-Zcrate-attr=feature(exclusive_range_pattern)", + "-Zcrate-attr=feature(exhaustive_patterns)", + "-Zcrate-attr=feature(extended_varargs_abi_support)", + "-Zcrate-attr=feature(extern_types)", + "-Zcrate-attr=feature(ffi_const)", + "-Zcrate-attr=feature(ffi_pure)", + "-Zcrate-attr=feature(ffi_returns_twice)", + "-Zcrate-attr=feature(fn_align)", + "-Zcrate-attr=feature(gen_blocks)", + "-Zcrate-attr=feature(generic_arg_infer)", + "-Zcrate-attr=feature(half_open_range_patterns_in_slices)", + "-Zcrate-attr=feature(if_let_guard)", + "-Zcrate-attr=feature(impl_trait_in_assoc_type)", + "-Zcrate-attr=feature(impl_trait_in_fn_trait_return)", + "-Zcrate-attr=feature(imported_main)", + "-Zcrate-attr=feature(inline_const)", + "-Zcrate-attr=feature(intra_doc_pointers)", + "-Zcrate-attr=feature(large_assignments)", + "-Zcrate-attr=feature(let_chains)", + "-Zcrate-attr=feature(link_arg_attribute)", + "-Zcrate-attr=feature(lint_reasons)", + "-Zcrate-attr=feature(macro_metavar_expr)", + "-Zcrate-attr=feature(marker_trait_attr)", + "-Zcrate-attr=feature(min_specialization)", + "-Zcrate-attr=feature(more_qualified_paths)", + "-Zcrate-attr=feature(must_not_suspend)", + "-Zcrate-attr=feature(naked_functions)", + "-Zcrate-attr=feature(native_link_modifiers_as_needed)", + "-Zcrate-attr=feature(negative_impls)", + "-Zcrate-attr=feature(never_type)", + "-Zcrate-attr=feature(never_type_fallback)", + "-Zcrate-attr=feature(no_core)", + "-Zcrate-attr=feature(no_sanitize)", + "-Zcrate-attr=feature(non_exhaustive_omitted_patterns_lint)", + "-Zcrate-attr=feature(object_safe_for_dispatch)", + "-Zcrate-attr=feature(offset_of_enum)", + "-Zcrate-attr=feature(optimize_attribute)", + "-Zcrate-attr=feature(proc_macro_hygiene)", + "-Zcrate-attr=feature(raw_ref_op)", + "-Zcrate-attr=feature(register_tool)", + "-Zcrate-attr=feature(repr_simd)", + "-Zcrate-attr=feature(rust_cold_cc)", + "-Zcrate-attr=feature(simd_ffi)", + "-Zcrate-attr=feature(stmt_expr_attributes)", + "-Zcrate-attr=feature(strict_provenance)", + "-Zcrate-attr=feature(string_deref_patterns)", + "-Zcrate-attr=feature(target_feature_11)", + "-Zcrate-attr=feature(thread_local)", + "-Zcrate-attr=feature(trait_alias)", + "-Zcrate-attr=feature(transmute_generic_consts)", + "-Zcrate-attr=feature(transparent_unions)", + "-Zcrate-attr=feature(trivial_bounds)", + "-Zcrate-attr=feature(try_blocks)", + "-Zcrate-attr=feature(type_alias_impl_trait)", + "-Zcrate-attr=feature(type_ascription)", + "-Zcrate-attr=feature(type_changing_struct_update)", + "-Zcrate-attr=feature(type_privacy_lints)", + "-Zcrate-attr=feature(unix_sigpipe)", + "-Zcrate-attr=feature(unsized_fn_params)", + "-Zcrate-attr=feature(unsized_tuple_coercion)", + "-Zcrate-attr=feature(used_with_arg)", + "-Zcrate-attr=feature(wasm_abi)", + "-Zcrate-attr=feature(yeet_expr)", + "-Zmir-opt-level=5", + "-Zvalidate-mir", + "-Zunstable-options", + "--edition=2021", + ], ]; static EXPENSIVE_RUSTFLAGS: &[&[&str]] = &[