8
8
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
9
9
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
10
10
11
- load ("@bazel_skylib//rules:common_settings.bzl" , "bool_flag" )
11
+ load ("@bazel_skylib//rules:common_settings.bzl" , "bool_flag" , "string_flag" )
12
12
13
13
exports_files (
14
14
glob (["*.bzl" ]),
15
15
visibility = ["//visibility:public" ],
16
16
)
17
17
18
+ # Disable tests and test libraries with --@rules_swiftnav//:disable_test=true
18
19
bool_flag (
19
20
name = "disable_tests" ,
20
21
build_setting_default = False ,
@@ -26,3 +27,57 @@ config_setting(
26
27
flag_values = {":disable_tests" : "true" },
27
28
visibility = ["//visibility:public" ],
28
29
)
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