Skip to content

Commit 1cc1b5a

Browse files
bvu405meta-codesync[bot]
authored andcommitted
Bump OSS setup.py cxx_std to 20 to match fbcode default
Summary: The OSS `pip install .` build (driven by `setup.py`) pinned `cxx_std=17`, while the internal Buck2 build uses fbcode's default `-std=c++20`. That mismatch let C++20 features land in `snapshot_lib/*.cpp` while still compiling green internally, and only broke later on the public GitHub Actions runner. Most recently: snapshot_lib/SnapshotReader.cpp:548: error: ... has no member named 'starts_with' `std::string::starts_with` is C++20. The call was introduced by D103561274 ("Fix SnapshotReader synthetic-filename + relative-path staging"), passed internal CI on `-std=c++20`, then broke the next OSS `pip install -v .` because `setup.py` was still pinning `cxx_std=17`. Bumping the OSS knob to C++20 lines the two builds up so we don't have to chase a workaround at every new C++20 call site. pybind11's `cxx_std=20` requires GCC >= 10, Clang >= 10, or MSVC>= 19.20, which the GitHub Actions `ubuntu-latest` image and the runners we publish all already meet. Reviewed By: pdepetro Differential Revision: D104728867 fbshipit-source-id: 8db44407ccb0cb6ed7486012cf276148b85b646e
1 parent fb24c2f commit 1cc1b5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def find_zstd():
6767
include_dirs=["."] + zstd_include_dirs,
6868
library_dirs=zstd_library_dirs,
6969
libraries=["zstd"],
70-
cxx_std=17,
70+
cxx_std=20,
7171
define_macros=[("PYBIND11_DETAILED_ERROR_MESSAGES", None)],
7272
),
7373
]

0 commit comments

Comments
 (0)