Skip to content

Commit

Permalink
Bump c++ standard to c++14 per default
Browse files Browse the repository at this point in the history
Fixes: bazelbuild#18181.

Closes: bazelbuild#18280.

Closes bazelbuild#18280.

PiperOrigin-RevId: 530246609
Change-Id: I6b49d1bd827e98ca65db87c34c1bb13106ffc232
(cherry picked from commit 978cd23)
  • Loading branch information
davido authored and thii committed Oct 11, 2023
1 parent 924bee9 commit 63116f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/cpp/bsd_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _impl(ctx):
),
flag_set(
actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend],
flag_groups = [flag_group(flags = ["-std=c++0x"])],
flag_groups = [flag_group(flags = ["-std=c++14"])],
),
],
)
Expand Down
4 changes: 2 additions & 2 deletions tools/cpp/unix_cc_configure.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=g-bad-file-header
# Copyright 2016 The Bazel Authors. All rights reserved.
#

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -409,7 +409,7 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
cxx_opts = split_escaped(get_env_var(
repository_ctx,
"BAZEL_CXXOPTS",
"-std=c++0x",
"-std=c++14",
False,
), ":")

Expand Down
2 changes: 1 addition & 1 deletion tools/cpp/windows_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ def _impl(ctx):
ACTION_NAMES.lto_backend,
ACTION_NAMES.clif_match,
],
flag_groups = [flag_group(flags = ["-std=gnu++0x"])],
flag_groups = [flag_group(flags = ["-std=gnu++14"])],
),
],
)
Expand Down

0 comments on commit 63116f1

Please sign in to comment.