@@ -5,15 +5,16 @@ use rustc_errors::{emitter::HumanReadableErrorType, registry, ColorConfig};
5
5
use rustc_middle:: middle:: cstore;
6
6
use rustc_session:: config:: { build_configuration, build_session_options, to_crate_config} ;
7
7
use rustc_session:: config:: { rustc_optgroups, ErrorOutputType , ExternLocation , Options , Passes } ;
8
- use rustc_session:: config:: { ExternEntry , LinkerPluginLto , LtoCli , SwitchWithOptPath } ;
9
- use rustc_session:: config:: { Externs , OutputType , OutputTypes , SymbolManglingVersion } ;
8
+ use rustc_session:: config:: { CFGuard , ExternEntry , LinkerPluginLto , LtoCli , SwitchWithOptPath } ;
9
+ use rustc_session:: config:: { Externs , OutputType , OutputTypes , Sanitizer , SymbolManglingVersion } ;
10
10
use rustc_session:: getopts;
11
11
use rustc_session:: lint:: Level ;
12
12
use rustc_session:: search_paths:: SearchPath ;
13
13
use rustc_session:: { build_session, Session } ;
14
14
use rustc_span:: edition:: { Edition , DEFAULT_EDITION } ;
15
15
use rustc_span:: symbol:: sym;
16
- use rustc_target:: spec:: { MergeFunctions , PanicStrategy , RelroLevel } ;
16
+ use rustc_span:: SourceFileHashAlgorithm ;
17
+ use rustc_target:: spec:: { LinkerFlavor , MergeFunctions , PanicStrategy , RelroLevel } ;
17
18
use std:: collections:: { BTreeMap , BTreeSet } ;
18
19
use std:: iter:: FromIterator ;
19
20
use std:: path:: PathBuf ;
@@ -383,12 +384,17 @@ fn test_codegen_options_tracking_hash() {
383
384
opts. cg . codegen_units = Some ( 42 ) ;
384
385
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
385
386
387
+ opts. cg . default_linker_libraries = true ;
388
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
389
+
386
390
opts. cg . extra_filename = String :: from ( "extra-filename" ) ;
387
391
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
388
392
389
393
opts. cg . incremental = Some ( String :: from ( "abc" ) ) ;
390
394
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
391
395
396
+ // `link_arg` is omitted because it just forwards to `link_args`.
397
+
392
398
opts. cg . link_args = vec ! [ String :: from( "abc" ) , String :: from( "def" ) ] ;
393
399
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
394
400
@@ -398,6 +404,12 @@ fn test_codegen_options_tracking_hash() {
398
404
opts. cg . linker = Some ( PathBuf :: from ( "linker" ) ) ;
399
405
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
400
406
407
+ opts. cg . linker_flavor = Some ( LinkerFlavor :: Gcc ) ;
408
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
409
+
410
+ opts. cg . no_stack_check = true ;
411
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
412
+
401
413
opts. cg . remark = Passes :: Some ( vec ! [ String :: from( "pass1" ) , String :: from( "pass2" ) ] ) ;
402
414
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
403
415
@@ -411,19 +423,19 @@ fn test_codegen_options_tracking_hash() {
411
423
// This list is in alphabetical order.
412
424
413
425
opts = reference. clone ( ) ;
414
- opts. cg . code_model = Some ( String :: from ( "code model" ) ) ;
426
+ opts. cg . bitcode_in_rlib = false ;
415
427
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
416
428
417
429
opts = reference. clone ( ) ;
418
- opts. cg . debug_assertions = Some ( true ) ;
430
+ opts. cg . code_model = Some ( String :: from ( "code model" ) ) ;
419
431
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
420
432
421
433
opts = reference. clone ( ) ;
422
- opts. cg . debuginfo = 0xdeadbeef ;
434
+ opts. cg . debug_assertions = Some ( true ) ;
423
435
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
424
436
425
437
opts = reference. clone ( ) ;
426
- opts. cg . debuginfo = 0xba5eba11 ;
438
+ opts. cg . debuginfo = 0xdeadbeef ;
427
439
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
428
440
429
441
opts = reference. clone ( ) ;
@@ -466,6 +478,10 @@ fn test_codegen_options_tracking_hash() {
466
478
opts. cg . no_vectorize_slp = true ;
467
479
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
468
480
481
+ opts = reference. clone ( ) ;
482
+ opts. cg . opt_level = "3" . to_string ( ) ;
483
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
484
+
469
485
opts = reference. clone ( ) ;
470
486
opts. cg . overflow_checks = Some ( true ) ;
471
487
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
@@ -505,14 +521,6 @@ fn test_codegen_options_tracking_hash() {
505
521
opts = reference. clone ( ) ;
506
522
opts. cg . target_feature = String :: from ( "all the features, all of them" ) ;
507
523
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
508
-
509
- opts = reference. clone ( ) ;
510
- opts. debugging_opts . tls_model = Some ( String :: from ( "tls model" ) ) ;
511
- assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
512
-
513
- opts = reference. clone ( ) ;
514
- opts. cg . bitcode_in_rlib = false ;
515
- assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
516
524
}
517
525
518
526
#[ test]
@@ -529,9 +537,24 @@ fn test_debugging_options_tracking_hash() {
529
537
opts. debugging_opts . ast_json_noexpand = true ;
530
538
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
531
539
540
+ opts. debugging_opts . borrowck = String :: from ( "other" ) ;
541
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
542
+
532
543
opts. debugging_opts . borrowck_stats = true ;
533
544
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
534
545
546
+ opts. debugging_opts . control_flow_guard = CFGuard :: Checks ;
547
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
548
+
549
+ opts. debugging_opts . deduplicate_diagnostics = true ;
550
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
551
+
552
+ opts. debugging_opts . dep_tasks = true ;
553
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
554
+
555
+ opts. debugging_opts . dont_buffer_diagnostics = true ;
556
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
557
+
535
558
opts. debugging_opts . dump_dep_graph = true ;
536
559
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
537
560
@@ -544,27 +567,80 @@ fn test_debugging_options_tracking_hash() {
544
567
opts. debugging_opts . dump_mir_dir = String :: from ( "abc" ) ;
545
568
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
546
569
570
+ opts. debugging_opts . dump_mir_exclude_pass_number = true ;
571
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
572
+
547
573
opts. debugging_opts . dump_mir_graphviz = true ;
548
574
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
549
575
576
+ opts. debugging_opts . emit_stack_sizes = true ;
577
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
578
+
579
+ opts. debugging_opts . hir_stats = true ;
580
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
581
+
582
+ opts. debugging_opts . identify_regions = true ;
583
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
584
+
585
+ opts. debugging_opts . incremental_ignore_spans = true ;
586
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
587
+
588
+ opts. debugging_opts . incremental_info = true ;
589
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
590
+
591
+ opts. debugging_opts . incremental_verify_ich = true ;
592
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
593
+
550
594
opts. debugging_opts . input_stats = true ;
551
595
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
552
596
553
597
opts. debugging_opts . keep_hygiene_data = true ;
554
598
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
555
599
600
+ opts. debugging_opts . link_native_libraries = false ;
601
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
602
+
603
+ opts. debugging_opts . llvm_time_trace = true ;
604
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
605
+
556
606
opts. debugging_opts . ls = true ;
557
607
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
558
608
609
+ opts. debugging_opts . macro_backtrace = true ;
610
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
611
+
559
612
opts. debugging_opts . meta_stats = true ;
560
613
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
561
614
615
+ opts. debugging_opts . nll_facts = true ;
616
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
617
+
562
618
opts. debugging_opts . no_analysis = true ;
563
619
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
564
620
621
+ opts. debugging_opts . no_interleave_lints = true ;
622
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
623
+
624
+ opts. debugging_opts . no_leak_check = true ;
625
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
626
+
627
+ opts. debugging_opts . no_parallel_llvm = true ;
628
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
629
+
565
630
opts. debugging_opts . parse_only = true ;
566
631
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
567
632
633
+ opts. debugging_opts . perf_stats = true ;
634
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
635
+
636
+ opts. debugging_opts . polonius = true ;
637
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
638
+
639
+ // `pre_link_arg` is omitted because it just forwards to `pre_link_args`.
640
+
641
+ opts. debugging_opts . pre_link_args = vec ! [ String :: from( "abc" ) , String :: from( "def" ) ] ;
642
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
643
+
568
644
opts. debugging_opts . print_link_args = true ;
569
645
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
570
646
@@ -577,12 +653,36 @@ fn test_debugging_options_tracking_hash() {
577
653
opts. debugging_opts . print_region_graph = true ;
578
654
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
579
655
656
+ opts. debugging_opts . print_type_sizes = true ;
657
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
658
+
580
659
opts. debugging_opts . query_dep_graph = true ;
581
660
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
582
661
662
+ opts. debugging_opts . query_stats = true ;
663
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
664
+
583
665
opts. debugging_opts . save_analysis = true ;
584
666
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
585
667
668
+ opts. debugging_opts . self_profile = SwitchWithOptPath :: Enabled ( None ) ;
669
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
670
+
671
+ opts. debugging_opts . self_profile_events = Some ( vec ! [ String :: new( ) ] ) ;
672
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
673
+
674
+ opts. debugging_opts . span_free_formats = true ;
675
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
676
+
677
+ opts. debugging_opts . terminal_width = Some ( 80 ) ;
678
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
679
+
680
+ opts. debugging_opts . threads = 99 ;
681
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
682
+
683
+ opts. debugging_opts . time = true ;
684
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
685
+
586
686
opts. debugging_opts . time_llvm_passes = true ;
587
687
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
588
688
@@ -592,6 +692,12 @@ fn test_debugging_options_tracking_hash() {
592
692
opts. debugging_opts . trace_macros = true ;
593
693
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
594
694
695
+ opts. debugging_opts . ui_testing = true ;
696
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
697
+
698
+ opts. debugging_opts . unpretty = Some ( "expanded" . to_string ( ) ) ;
699
+ assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
700
+
595
701
opts. debugging_opts . unstable_options = true ;
596
702
assert_eq ! ( reference. dep_tracking_hash( ) , opts. dep_tracking_hash( ) ) ;
597
703
@@ -605,10 +711,42 @@ fn test_debugging_options_tracking_hash() {
605
711
opts. debugging_opts . allow_features = Some ( vec ! [ String :: from( "lang_items" ) ] ) ;
606
712
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
607
713
714
+ opts = reference. clone ( ) ;
715
+ opts. debugging_opts . always_encode_mir = true ;
716
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
717
+
608
718
opts = reference. clone ( ) ;
609
719
opts. debugging_opts . asm_comments = true ;
610
720
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
611
721
722
+ opts = reference. clone ( ) ;
723
+ opts. debugging_opts . binary_dep_depinfo = true ;
724
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
725
+
726
+ opts = reference. clone ( ) ;
727
+ opts. debugging_opts . codegen_backend = Some ( "abc" . to_string ( ) ) ;
728
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
729
+
730
+ opts = reference. clone ( ) ;
731
+ opts. debugging_opts . crate_attr = vec ! [ "abc" . to_string( ) ] ;
732
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
733
+
734
+ opts = reference. clone ( ) ;
735
+ opts. debugging_opts . debug_macros = true ;
736
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
737
+
738
+ opts = reference. clone ( ) ;
739
+ opts. debugging_opts . dep_info_omit_d_target = true ;
740
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
741
+
742
+ opts = reference. clone ( ) ;
743
+ opts. debugging_opts . dual_proc_macros = true ;
744
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
745
+
746
+ opts = reference. clone ( ) ;
747
+ opts. debugging_opts . embed_bitcode = true ;
748
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
749
+
612
750
opts = reference. clone ( ) ;
613
751
opts. debugging_opts . fewer_names = true ;
614
752
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
@@ -617,22 +755,94 @@ fn test_debugging_options_tracking_hash() {
617
755
opts. debugging_opts . force_overflow_checks = Some ( true ) ;
618
756
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
619
757
758
+ opts = reference. clone ( ) ;
759
+ opts. debugging_opts . force_unstable_if_unmarked = true ;
760
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
761
+
762
+ opts = reference. clone ( ) ;
763
+ opts. debugging_opts . fuel = Some ( ( "abc" . to_string ( ) , 99 ) ) ;
764
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
765
+
766
+ opts = reference. clone ( ) ;
767
+ opts. debugging_opts . human_readable_cgu_names = true ;
768
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
769
+
770
+ opts = reference. clone ( ) ;
771
+ opts. debugging_opts . inline_in_all_cgus = Some ( true ) ;
772
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
773
+
774
+ opts = reference. clone ( ) ;
775
+ opts. debugging_opts . insert_sideeffect = true ;
776
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
777
+
778
+ opts = reference. clone ( ) ;
779
+ opts. debugging_opts . instrument_mcount = true ;
780
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
781
+
782
+ opts = reference. clone ( ) ;
783
+ opts. debugging_opts . link_only = true ;
784
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
785
+
620
786
opts = reference. clone ( ) ;
621
787
opts. debugging_opts . merge_functions = Some ( MergeFunctions :: Disabled ) ;
622
788
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
623
789
790
+ opts = reference. clone ( ) ;
791
+ opts. debugging_opts . mir_emit_retag = true ;
792
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
793
+
624
794
opts = reference. clone ( ) ;
625
795
opts. debugging_opts . mir_opt_level = 3 ;
626
796
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
627
797
798
+ opts = reference. clone ( ) ;
799
+ opts. debugging_opts . mutable_noalias = true ;
800
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
801
+
802
+ opts = reference. clone ( ) ;
803
+ opts. debugging_opts . new_llvm_pass_manager = true ;
804
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
805
+
628
806
opts = reference. clone ( ) ;
629
807
opts. debugging_opts . no_codegen = true ;
630
808
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
631
809
810
+ opts = reference. clone ( ) ;
811
+ opts. debugging_opts . no_generate_arange_section = true ;
812
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
813
+
632
814
opts = reference. clone ( ) ;
633
815
opts. debugging_opts . no_landing_pads = true ;
634
816
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
635
817
818
+ opts = reference. clone ( ) ;
819
+ opts. debugging_opts . no_link = true ;
820
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
821
+
822
+ opts = reference. clone ( ) ;
823
+ opts. debugging_opts . no_profiler_runtime = true ;
824
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
825
+
826
+ opts = reference. clone ( ) ;
827
+ opts. debugging_opts . osx_rpath_install_name = true ;
828
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
829
+
830
+ opts = reference. clone ( ) ;
831
+ opts. debugging_opts . panic_abort_tests = true ;
832
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
833
+
834
+ opts = reference. clone ( ) ;
835
+ opts. debugging_opts . plt = Some ( true ) ;
836
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
837
+
838
+ opts = reference. clone ( ) ;
839
+ opts. debugging_opts . print_fuel = Some ( "abc" . to_string ( ) ) ;
840
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
841
+
842
+ opts = reference. clone ( ) ;
843
+ opts. debugging_opts . profile = true ;
844
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
845
+
636
846
opts = reference. clone ( ) ;
637
847
opts. debugging_opts . relro_level = Some ( RelroLevel :: Full ) ;
638
848
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
@@ -641,18 +851,66 @@ fn test_debugging_options_tracking_hash() {
641
851
opts. debugging_opts . report_delayed_bugs = true ;
642
852
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
643
853
854
+ opts = reference. clone ( ) ;
855
+ opts. debugging_opts . run_dsymutil = false ;
856
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
857
+
858
+ opts = reference. clone ( ) ;
859
+ opts. debugging_opts . sanitizer = Some ( Sanitizer :: Address ) ;
860
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
861
+
862
+ opts = reference. clone ( ) ;
863
+ opts. debugging_opts . sanitizer_memory_track_origins = 2 ;
864
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
865
+
866
+ opts = reference. clone ( ) ;
867
+ opts. debugging_opts . sanitizer_recover = vec ! [ Sanitizer :: Address ] ;
868
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
869
+
870
+ opts = reference. clone ( ) ;
871
+ opts. debugging_opts . saturating_float_casts = true ;
872
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
873
+
874
+ opts = reference. clone ( ) ;
875
+ opts. debugging_opts . share_generics = Some ( true ) ;
876
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
877
+
644
878
opts = reference. clone ( ) ;
645
879
opts. debugging_opts . show_span = Some ( String :: from ( "abc" ) ) ;
646
880
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
647
881
882
+ opts = reference. clone ( ) ;
883
+ opts. debugging_opts . src_hash_algorithm = Some ( SourceFileHashAlgorithm :: Sha1 ) ;
884
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
885
+
886
+ opts = reference. clone ( ) ;
887
+ opts. debugging_opts . strip_debuginfo_if_disabled = true ;
888
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
889
+
648
890
opts = reference. clone ( ) ;
649
891
opts. debugging_opts . symbol_mangling_version = SymbolManglingVersion :: V0 ;
650
892
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
651
893
894
+ opts = reference. clone ( ) ;
895
+ opts. debugging_opts . teach = true ;
896
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
897
+
898
+ opts = reference. clone ( ) ;
899
+ opts. debugging_opts . thinlto = Some ( true ) ;
900
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
901
+
902
+ opts = reference. clone ( ) ;
903
+ opts. debugging_opts . tls_model = Some ( String :: from ( "tls model" ) ) ;
904
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
905
+
652
906
opts = reference. clone ( ) ;
653
907
opts. debugging_opts . treat_err_as_bug = Some ( 1 ) ;
654
908
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
655
909
910
+ opts = reference. clone ( ) ;
911
+ opts. debugging_opts . unleash_the_miri_inside_of_you = true ;
912
+ assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
913
+
656
914
opts = reference. clone ( ) ;
657
915
opts. debugging_opts . verify_llvm_ir = true ;
658
916
assert ! ( reference. dep_tracking_hash( ) != opts. dep_tracking_hash( ) ) ;
0 commit comments