Skip to content

Commit

Permalink
Completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
jungleraptor committed Nov 1, 2022
1 parent c98e203 commit 5a332fc
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions tools/cpp/unix_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,38 @@ def _impl(ctx):
],
)

cxx98_standard_feature = feature(
name = "c++98",
provides = ["cxx_standard"],
flag_sets = [
flag_set(
actions = all_cpp_compile_actions,
flag_groups = ([
flag_group(
flags = ["-std=c++98"],
),
]),
),
],
)

cxx11_standard_feature = feature(
name = "c++11",
provides = ["cxx_standard"],
flag_sets = [
flag_set(
actions = all_cpp_compile_actions,
flag_groups = ([
flag_group(
flags = ["-std=c++0x"],
),
]),
),
],
)

cxx14_standard_feature = feature(
name = "cxx14_standard",
name = "c++14",
provides = ["cxx_standard"],
flag_sets = [
flag_set(
Expand All @@ -242,7 +272,7 @@ def _impl(ctx):
)

cxx17_standard_feature = feature(
name = "cxx17_standard",
name = "c++17",
provides = ["cxx_standard"],
flag_sets = [
flag_set(
Expand All @@ -257,7 +287,7 @@ def _impl(ctx):
)

cxx20_standard_feature = feature(
name = "cxx20_standard",
name = "c++20",
provides = ["cxx_standard"],
flag_sets = [
flag_set(
Expand Down Expand Up @@ -1316,6 +1346,8 @@ def _impl(ctx):
] if ctx.attr.supports_start_end_lib else []
) + [
default_compile_flags_feature,
cxx98_standard_feature,
cxx11_standard_feature,
cxx14_standard_feature,
cxx17_standard_feature,
cxx20_standard_feature,
Expand Down Expand Up @@ -1355,6 +1387,8 @@ def _impl(ctx):
) + [
coverage_feature,
default_compile_flags_feature,
cxx98_standard_feature,
cxx11_standard_feature,
cxx14_standard_feature,
cxx17_standard_feature,
cxx20_standard_feature,
Expand Down

0 comments on commit 5a332fc

Please sign in to comment.