Skip to content

Commit

Permalink
pybind: Hard code -std=c++17 option spelling (#14669)
Browse files Browse the repository at this point in the history
We know that our hard-coded libclang handles Drake's minimum C++ standard
revision, so we can just hard-code that spelling for mkdoc.  This allows
users to build object code using -std=c++20 mode without angering libclang.
  • Loading branch information
jwnimmer-tri committed Feb 18, 2021
1 parent 507f3fd commit 9905f8a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/skylark/pybind.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def _generate_pybind_documentation_header_impl(ctx):
",".join(ctx.attr.ignore_dirs_for_coverage))
for p in ctx.attr.exclude_hdr_patterns:
args.add("-exclude-hdr-patterns=" + p)
args.add_all(ctx.fragments.cpp.cxxopts, uniquify = True)
args.add("-std=c++17")
args.add("-w")

# N.B. This is for `targets` only.
Expand Down Expand Up @@ -415,7 +415,6 @@ generate_pybind_documentation_header = rule(
default = [],
),
},
fragments = ["cpp"],
implementation = _generate_pybind_documentation_header_impl,
output_to_genfiles = True,
)
Expand Down

0 comments on commit 9905f8a

Please sign in to comment.