fbcode_builder: force snappy to build with RTTI#459
Open
afrind wants to merge 1 commit into
Open
Conversation
Summary: folly's `Compression.cpp` `dynamic_cast`s `snappy::Source` / `snappy::Sink`, which requires their typeinfo symbols. The snappy revision pinned in our manifest (`27ab5f7f...`) hardcodes `-fno-rtti` in `CMAKE_CXX_FLAGS` and even strips any `-frtti` we try to inject, so `libsnappy.so` ships without typeinfo for those polymorphic bases. Any downstream that actually pulls in folly's Snappy codec (proxygen, mvfst, folly's own `compression_compression_test` which is gated behind `BUILD_SLOW_TESTS`) fails to link with: undefined reference to `typeinfo for snappy::Source' Override via `CMAKE_CXX_FLAGS_<CONFIG>`, which CMake appends after `CMAKE_CXX_FLAGS` and snappy doesn't touch — the trailing `-frtti` wins over the earlier `-fno-rtti` in gcc. Differential Revision: D106941114
|
@afrind has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106941114. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
folly's
Compression.cppdynamic_castssnappy::Source/snappy::Sink, which requires their typeinfo symbols. The snappy revision pinned in our manifest (27ab5f7f...) hardcodes-fno-rttiinCMAKE_CXX_FLAGSand even strips any-frttiwe try to inject, solibsnappy.soships without typeinfo for those polymorphic bases. Any downstream that actually pulls in folly's Snappy codec (proxygen, mvfst, folly's owncompression_compression_testwhich is gated behindBUILD_SLOW_TESTS) fails to link with:undefined reference to `typeinfo for snappy::Source'
Override via
CMAKE_CXX_FLAGS_<CONFIG>, which CMake appends afterCMAKE_CXX_FLAGSand snappy doesn't touch — the trailing-frttiwins over the earlier-fno-rttiin gcc.Differential Revision: D106941114