@@ -526,61 +526,150 @@ def check_gdb(cfg):
526
526
# target that doesn't support it will fail at compile time, not at runtime. This can
527
527
# be achieved by creating a `.verify.cpp` test that checks for the right errors, and
528
528
# mark that test as requiring `stdlib=<vendor>-libc++ && target=<target>`.
529
+ #
530
+ # Since it is not always known which deployment target to pick there are
531
+ # short-hands based on the LLVM version like using-built-library-before-llvm-xx.
532
+ # These short-hands make it easy for libc++ developers to select the proper
533
+ # version the feature will be available in and allows vendors to set the proper
534
+ # target information.
529
535
DEFAULT_FEATURES += [
536
+ # Backdeployment short-hands
537
+ Feature (
538
+ name = "using-built-library-before-llvm-11" ,
539
+ when = lambda cfg : BooleanExpression .evaluate (
540
+ "stdlib=apple-libc++ && target={{.+}}-apple-macosx{{(10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0)(.0)?}}" ,
541
+ cfg .available_features ,
542
+ ),
543
+ ),
544
+ Feature (
545
+ name = "using-built-library-before-llvm-12" ,
546
+ when = lambda cfg : BooleanExpression .evaluate (
547
+ "using-built-library-before-llvm-11 || (stdlib=apple-libc++ && target={{.+}}-apple-macosx12.{{(0|1|2)}}.0)" ,
548
+ cfg .available_features ,
549
+ ),
550
+ ),
551
+
552
+ Feature (
553
+ name = "using-built-library-before-llvm-13" ,
554
+ when = lambda cfg : BooleanExpression .evaluate (
555
+ "using-built-library-before-llvm-12 || (stdlib=apple-libc++ && target={{.+}}-apple-macosx{{((12.(3|4|5|6|7))|(13.(0|1|2|3)))}}.0)" ,
556
+ cfg .available_features ,
557
+ ),
558
+ ),
559
+
560
+ Feature (
561
+ name = "using-built-library-before-llvm-14" ,
562
+ when = lambda cfg : BooleanExpression .evaluate (
563
+ "using-built-library-before-llvm-13" ,
564
+ cfg .available_features ,
565
+ ),
566
+ ),
567
+
568
+ Feature (
569
+ name = "using-built-library-before-llvm-15" ,
570
+ when = lambda cfg : BooleanExpression .evaluate (
571
+ "using-built-library-before-llvm-14 || (stdlib=apple-libc++ && target={{.+}}-apple-macosx13.{{(4|5|6)}}.0)" ,
572
+ cfg .available_features ,
573
+ ),
574
+ ),
575
+
576
+ Feature (
577
+ name = "using-built-library-before-llvm-16" ,
578
+ when = lambda cfg : BooleanExpression .evaluate (
579
+ "using-built-library-before-llvm-15 || (stdlib=apple-libc++ && target={{.+}}-apple-macosx14.{{(0|1|2|3)}}.0)" ,
580
+ cfg .available_features ,
581
+ ),
582
+ ),
583
+
584
+ Feature (
585
+ name = "using-built-library-before-llvm-17" ,
586
+ when = lambda cfg : BooleanExpression .evaluate (
587
+ "using-built-library-before-llvm-16" ,
588
+ cfg .available_features ,
589
+ ),
590
+ ),
591
+
592
+ Feature (
593
+ name = "using-built-library-before-llvm-18" ,
594
+ when = lambda cfg : BooleanExpression .evaluate (
595
+ # For now, no released version of macOS contains LLVM 18
596
+ # TODO(ldionne) Please provide the correct value.
597
+ "using-built-library-before-llvm-17 || stdlib=apple-libc++ && target={{.+}}-apple-macosx{{.+}}" ,
598
+ cfg .available_features ,
599
+ ),
600
+ ),
601
+
602
+ Feature (
603
+ name = "using-built-library-before-llvm-19" ,
604
+ when = lambda cfg : BooleanExpression .evaluate (
605
+ # For now, no released version of macOS contains LLVM 19
606
+ # TODO(ldionne) Please provide the correct value.
607
+ "using-built-library-before-llvm-18 || stdlib=apple-libc++ && target={{.+}}-apple-macosx{{.+}}" ,
608
+ cfg .available_features ,
609
+ ),
610
+ ),
611
+
530
612
# Tests that require std::to_chars(floating-point) in the built library
531
613
Feature (
532
614
name = "availability-fp_to_chars-missing" ,
533
615
when = lambda cfg : BooleanExpression .evaluate (
534
- "stdlib=apple-libc++ && target={{.+}}-apple-macosx{{(10.13|10.14|10.15|11.0|12.0|13.0)(.0)?}} " ,
616
+ "using-built-library-before-llvm-13 " ,
535
617
cfg .available_features ,
536
618
),
537
619
),
538
620
# Tests that require https://wg21.link/P0482 support in the built library
539
621
Feature (
540
622
name = "availability-char8_t_support-missing" ,
541
623
when = lambda cfg : BooleanExpression .evaluate (
542
- "stdlib=apple-libc++ && target={{.+}}-apple-macosx{{(10.13|10.14|10.15|11.0)(.0)?}} " ,
624
+ "using-built-library-before-llvm-11 " ,
543
625
cfg .available_features ,
544
626
),
545
627
),
546
628
# Tests that require __libcpp_verbose_abort support in the built library
547
629
Feature (
548
630
name = "availability-verbose_abort-missing" ,
549
631
when = lambda cfg : BooleanExpression .evaluate (
550
- "stdlib=apple-libc++ && target={{.+}}-apple-macosx{{(10.13|10.14|10.15|11.0|12.0|13.0)(.0)?}} " ,
632
+ "using-built-library-before-llvm-13 " ,
551
633
cfg .available_features ,
552
634
),
553
635
),
554
636
# Tests that require std::pmr support in the built library
555
637
Feature (
556
638
name = "availability-pmr-missing" ,
557
639
when = lambda cfg : BooleanExpression .evaluate (
558
- "stdlib=apple-libc++ && target={{.+}}-apple-macosx{{(10.13|10.14|10.15|11.0|12.0|13.0)(.0)?}} " ,
640
+ "using-built-library-before-llvm-13 " ,
559
641
cfg .available_features ,
560
642
),
561
643
),
562
644
# Tests that require std::filesystem support in the built library
563
645
Feature (
564
646
name = "availability-filesystem-missing" ,
565
647
when = lambda cfg : BooleanExpression .evaluate (
566
- "stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{(13|14)(.0)?}} " ,
648
+ "using-built-library-before-llvm-11 " ,
567
649
cfg .available_features ,
568
650
),
569
651
),
570
652
# Tests that require the C++20 synchronization library (P1135R6 implemented by https://llvm.org/D68480) in the built library
571
653
Feature (
572
654
name = "availability-synchronization_library-missing" ,
573
655
when = lambda cfg : BooleanExpression .evaluate (
574
- "stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{(13|14|15)(.0)?}} " ,
656
+ "using-built-library-before-llvm-11 " ,
575
657
cfg .available_features ,
576
658
),
577
659
),
578
660
# Tests that require time zone database support in the built library
579
661
Feature (
580
662
name = "availability-tzdb-missing" ,
581
663
when = lambda cfg : BooleanExpression .evaluate (
582
- # TODO(ldionne) Please provide the correct value.
583
- "(stdlib=apple-libc++ && target={{.+}}-apple-macosx{{(10.13|10.14|10.15|11.0|12.0|13.0)(.0)?}})" ,
664
+ "using-built-library-before-llvm-19" ,
665
+ cfg .available_features ,
666
+ ),
667
+ ),
668
+ # Tests that require support for <print> and std::print in <ostream> in the built library.
669
+ Feature (
670
+ name = "availability-print-missing" ,
671
+ when = lambda cfg : BooleanExpression .evaluate (
672
+ "using-built-library-before-llvm-18" ,
584
673
cfg .available_features ,
585
674
),
586
675
),
0 commit comments