88# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
99# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
1010
11- load ("@bazel_skylib//rules:common_settings.bzl" , "bool_flag" )
11+ load ("@bazel_skylib//rules:common_settings.bzl" , "bool_flag" , "string_flag" )
1212
1313exports_files (
1414 glob (["*.bzl" ]),
1515 visibility = ["//visibility:public" ],
1616)
1717
18+ # Disable tests and test libraries with --@rules_swiftnav//:disable_test=true
1819bool_flag (
1920 name = "disable_tests" ,
2021 build_setting_default = False ,
@@ -26,3 +27,57 @@ config_setting(
2627 flag_values = {":disable_tests" : "true" },
2728 visibility = ["//visibility:public" ],
2829)
30+
31+ # Enable exceptions with --@rules_swiftnav//:enable_exceptions=true
32+ bool_flag (
33+ name = "enable_exceptions" ,
34+ build_setting_default = False ,
35+ visibility = ["//visibility:public" ],
36+ )
37+
38+ config_setting (
39+ name = "_enable_exceptions" ,
40+ flag_values = {":enable_exceptions" : "true" },
41+ visibility = ["//visibility:public" ],
42+ )
43+
44+ # Enable rtti with --@rules_swiftnav//:enable_exceptions=true
45+ bool_flag (
46+ name = "enable_rtti" ,
47+ build_setting_default = False ,
48+ visibility = ["//visibility:public" ],
49+ )
50+
51+ config_setting (
52+ name = "_enable_rtti" ,
53+ flag_values = {":enable_rtti" : "true" },
54+ visibility = ["//visibility:public" ],
55+ )
56+
57+ # Allows us to experiment with building the codebase with different standards.
58+ string_flag (
59+ name = "cxx_standard" ,
60+ build_setting_default = "" , #inactive by default
61+ visibility = ["//visibility:public" ],
62+ )
63+
64+ # Enable with --@rules_swiftnav//:cxx_standard=17
65+ config_setting (
66+ name = "cxx17" ,
67+ flag_values = {":cxx_standard" : "17" },
68+ visibility = ["//visibility:public" ],
69+ )
70+
71+ # Enable with --@rules_swiftnav//:cxx_standard=20
72+ config_setting (
73+ name = "cxx20" ,
74+ flag_values = {":cxx_standard" : "20" },
75+ visibility = ["//visibility:public" ],
76+ )
77+
78+ # Enable with --@rules_swiftnav//:cxx_standard=23
79+ config_setting (
80+ name = "cxx23" ,
81+ flag_values = {":cxx_standard" : "23" },
82+ visibility = ["//visibility:public" ],
83+ )
0 commit comments