Skip to content

Enable Snappy compression support in LevelDb in cmake builds #9596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
de01dd8
Enable Snappy compression support in LevelDb in cmake builds
dconeybe Apr 7, 2022
db64614
leveldb_snappy_test.cc: added a test to verify Snappy compression sup…
dconeybe Apr 7, 2022
ffe219d
project.pbxproj: add leveldb_snappy_test.cc
dconeybe Apr 8, 2022
9b9a19d
leveldb.cmake: use FindPython3 instead of FindPythonInterp, if it is …
dconeybe Apr 8, 2022
b299ea8
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 13, 2022
e0ce564
Apply a patch to Snappy to fix the build with gcc on linux: https://g…
dconeybe Apr 13, 2022
6e0f4bc
check_whitespace.sh: ignore snappy.patch, which has required trailing…
dconeybe Apr 13, 2022
3822eba
xcresult_logs.py: fix UnicodeEncodeError when printing logs to stdout
dconeybe Apr 13, 2022
b4c1d07
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 13, 2022
7db7e65
Only run LevelDbHasSnappySupportCompiledIn in cmake builds
dconeybe Apr 13, 2022
c4ec40e
leveldb_snappy_test.cc: format code with scripts/style.sh
dconeybe Apr 13, 2022
73a558c
leveldb_snappy_test.cc: REVERT ME: temporarily allow the test to fail…
dconeybe Apr 13, 2022
dd113af
xcresult_logs.py: change the UnicodeEncodeError avoidance strategy to…
dconeybe Apr 13, 2022
f45b7a7
xcresult_logs.py: Another fix for when sys.stdout does not have a 'bu…
dconeybe Apr 13, 2022
600122e
Revert "leveldb_snappy_test.cc: REVERT ME: temporarily allow the test…
dconeybe Apr 13, 2022
99f4ed9
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 13, 2022
142325a
leveldb_snappy_test.cc: also verify NO snappy support on iOS
dconeybe Apr 13, 2022
db22a07
Rename FIRESTORE_TESTS_CMAKE_BUILD to FIREBASE_TESTS_BUILT_BY_CMAKE a…
dconeybe Apr 13, 2022
0ed921a
leveldb_snappy_test.cc: implement LevelDbDir() ourselves
dconeybe Apr 13, 2022
47c2b31
leveldb_snappy_test.cc: fail fast if creating the LevelDb directory f…
dconeybe Apr 13, 2022
cc3b51a
leveldb_snappy_test.cc: format code with scripts/style.sh
dconeybe Apr 13, 2022
280e8ae
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 14, 2022
7ca90fc
Specify --verbose to ctest instead of --output-on-failure
dconeybe Apr 14, 2022
582b384
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 14, 2022
d57360f
Add FIRESTORE_INCLUDE_OBJC cmake cache variable to provide a way to a…
dconeybe Apr 15, 2022
0ed860a
Add FIREBASE_PYTHON_EXECUTABLE cmake cache var
dconeybe Apr 15, 2022
eb5272c
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 15, 2022
9534509
Dynamically create Python virtualenvs and install requirements into them
dconeybe Apr 15, 2022
865162a
More python_setup.cmake improvements
dconeybe Apr 15, 2022
70aa8b8
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 16, 2022
06b5a2f
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe Apr 27, 2022
ece6774
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe May 9, 2022
c977bef
Merge remote-tracking branch 'origin/master' into snappy2
dconeybe May 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ option(
ON
)


list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake)
include(compiler_setup)
include(sanitizer_options)
Expand Down Expand Up @@ -234,6 +233,12 @@ if(NOT ZLIB_FOUND)
endif()


# Snappy
set(SNAPPY_BUILD_TESTS OFF CACHE BOOL "Firestore disabled")
set(SNAPPY_BUILD_BENCHMARKS OFF CACHE BOOL "Firestore disabled")
add_external_subdirectory(snappy)
firebase_ios_add_alias(Snappy::Snappy snappy)

# LevelDB
set(LEVELDB_BUILD_TESTS OFF CACHE BOOL "Firestore disabled")
set(LEVELDB_BUILD_BENCHMARKS OFF CACHE BOOL "Firestore disabled")
Expand Down
14 changes: 14 additions & 0 deletions Firestore/Example/Firestore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
06A3926F89C847846BE4D6BE /* http.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9720B89AAC00B5BCE7 /* http.pb.cc */; };
06BCEB9C65DFAA142F3D3F0B /* view_testing.cc in Sources */ = {isa = PBXBuildFile; fileRef = A5466E7809AD2871FFDE6C76 /* view_testing.cc */; };
072D805A94E767DE4D371881 /* FSTSyncEngineTestDriver.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E02E20213FFC00B64F25 /* FSTSyncEngineTestDriver.mm */; };
077292C9797D97D3851F15CE /* leveldb_snappy_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */; };
0794FACCB1C0C4881A76C28D /* value_util_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 40F9D09063A07F710811A84F /* value_util_test.cc */; };
079E63E270F3EFCA175D2705 /* cc_compilation_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1B342370EAE3AA02393E33EB /* cc_compilation_test.cc */; };
07A64E6C4EB700E3AF3FD496 /* document_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB6B908320322E4D00CC290A /* document_test.cc */; };
Expand Down Expand Up @@ -735,6 +736,7 @@
7B8D7BAC1A075DB773230505 /* app_testing.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5467FB07203E6A44009C9584 /* app_testing.mm */; };
7BCC5973C4F4FCC272150E31 /* FIRCollectionReferenceTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E045202154AA00B64F25 /* FIRCollectionReferenceTests.mm */; };
7BCF050BA04537B0E7D44730 /* exponential_backoff_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6D1B68420E2AB1A00B35856 /* exponential_backoff_test.cc */; };
7C1DC1B44729381126D083AE /* leveldb_snappy_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */; };
7C5E017689012489AAB7718D /* CodableGeoPointTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5495EB022040E90200EBA509 /* CodableGeoPointTests.swift */; };
7C7BA1DB0B66EB899A928283 /* hashing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54511E8D209805F8005BD28F /* hashing_test.cc */; };
7D25D41B013BB70ADE526055 /* target_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 526D755F65AC676234F57125 /* target_test.cc */; };
Expand Down Expand Up @@ -762,6 +764,7 @@
81AF02881A8D23D02FC202F6 /* bundle_loader_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = A853C81A6A5A51C9D0389EDA /* bundle_loader_test.cc */; };
81B23D2D4E061074958AF12F /* target.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE7D20B89AAC00B5BCE7 /* target.pb.cc */; };
81D1B1D2B66BD8310AC5707F /* string_win_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 79507DF8378D3C42F5B36268 /* string_win_test.cc */; };
82228CD6CE4A7A9254F8E82D /* leveldb_snappy_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */; };
822E5D5EC4955393DF26BC5C /* string_apple_benchmark.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C73C0CC6F62A90D8573F383 /* string_apple_benchmark.mm */; };
82E3634FCF4A882948B81839 /* FIRQueryUnitTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = FF73B39D04D1760190E6B84A /* FIRQueryUnitTests.mm */; };
8342277EB0553492B6668877 /* leveldb_opener_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 75860CD13AF47EB1EA39EC2F /* leveldb_opener_test.cc */; };
Expand Down Expand Up @@ -851,6 +854,7 @@
97729B53698C0E52EB165003 /* field_filter_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = E8551D6C6FB0B1BACE9E5BAD /* field_filter_test.cc */; };
9774A6C2AA02A12D80B34C3C /* database_id_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB71064B201FA60300344F18 /* database_id_test.cc */; };
9783FAEA4CF758E8C4C2D76E /* hashing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54511E8D209805F8005BD28F /* hashing_test.cc */; };
978D9EFDC56CC2E1FA468712 /* leveldb_snappy_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */; };
9860F493EBF43AF5AC0A88BD /* empty_credentials_provider_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8FA60B08D59FEA0D6751E87F /* empty_credentials_provider_test.cc */; };
98708140787A9465D883EEC9 /* leveldb_mutation_queue_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5C7942B6244F4C416B11B86C /* leveldb_mutation_queue_test.cc */; };
98FE82875A899A40A98AAC22 /* leveldb_opener_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 75860CD13AF47EB1EA39EC2F /* leveldb_opener_test.cc */; };
Expand Down Expand Up @@ -1066,6 +1070,7 @@
C4055D868A38221B332CD03D /* FSTIntegrationTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5491BC711FB44593008B3588 /* FSTIntegrationTestCase.mm */; };
C426C6E424FB2199F5C2C5BC /* document.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D821C2DDC800EFB9CC /* document.pb.cc */; };
C43A555928CB0441096F82D2 /* FIRDocumentReferenceTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E049202154AA00B64F25 /* FIRDocumentReferenceTests.mm */; };
C4548D8C790387C8E64F0FC4 /* leveldb_snappy_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */; };
C482E724F4B10968417C3F78 /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B79CA87A1A01FC5329031C9B /* Pods_Firestore_FuzzTests_iOS.framework */; };
C4C7A8D11DC394EF81B7B1FA /* filesystem_testing.cc in Sources */ = {isa = PBXBuildFile; fileRef = BA02DA2FCD0001CFC6EB08DA /* filesystem_testing.cc */; };
C524026444E83EEBC1773650 /* objc_type_traits_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2A0CF41BA5AED6049B0BEB2C /* objc_type_traits_apple_test.mm */; };
Expand Down Expand Up @@ -1225,6 +1230,7 @@
EA38690795FBAA182A9AA63E /* FIRDatabaseTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E06C202154D500B64F25 /* FIRDatabaseTests.mm */; };
EA46611779C3EEF12822508C /* annotations.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9520B89AAC00B5BCE7 /* annotations.pb.cc */; };
EAA1962BFBA0EBFBA53B343F /* bundle_builder.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4F5B96F3ABCD2CA901DB1CD4 /* bundle_builder.cc */; };
EAC0914B6DCC53008483AEE3 /* leveldb_snappy_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */; };
EADD28A7859FBB9BE4D913B0 /* memory_remote_document_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1CA9800A53669EFBFFB824E3 /* memory_remote_document_cache_test.cc */; };
EB04FE18E5794FEC187A09E3 /* FSTMemorySpecTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E02F20213FFC00B64F25 /* FSTMemorySpecTests.mm */; };
EB2137E6FBB0DDE2DF80E3D0 /* target_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 526D755F65AC676234F57125 /* target_test.cc */; };
Expand Down Expand Up @@ -1701,6 +1707,7 @@
D5B2593BCB52957D62F1C9D3 /* perf_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = perf_spec_test.json; sourceTree = "<group>"; };
D5B25E7E7D6873CBA4571841 /* FIRNumericTransformTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRNumericTransformTests.mm; sourceTree = "<group>"; };
D7DF4A6F740086A2D8C0E28E /* Pods_Firestore_Tests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = leveldb_snappy_test.cc; sourceTree = "<group>"; };
DAFF0CF521E64AC30062958F /* Firestore_Example_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Firestore_Example_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
DAFF0CF721E64AC30062958F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
DAFF0CF821E64AC30062958F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2074,6 +2081,7 @@
5C7942B6244F4C416B11B86C /* leveldb_mutation_queue_test.cc */,
75860CD13AF47EB1EA39EC2F /* leveldb_opener_test.cc */,
0840319686A223CC4AD3FAB1 /* leveldb_remote_document_cache_test.cc */,
D9D94300B9C02F7069523C00 /* leveldb_snappy_test.cc */,
E76F0CDF28E5FA62D21DE648 /* leveldb_target_cache_test.cc */,
88CF09277CFA45EE1273E3BA /* leveldb_transaction_test.cc */,
332485C4DCC6BA0DBB5E31B7 /* leveldb_util_test.cc */,
Expand Down Expand Up @@ -3612,6 +3620,7 @@
1D7919CD2A05C15803F5FE05 /* leveldb_mutation_queue_test.cc in Sources */,
23EFC681986488B033C2B318 /* leveldb_opener_test.cc in Sources */,
F10A3E4E164A5458DFF7EDE6 /* leveldb_remote_document_cache_test.cc in Sources */,
7C1DC1B44729381126D083AE /* leveldb_snappy_test.cc in Sources */,
7D40C8EB7755138F85920637 /* leveldb_target_cache_test.cc in Sources */,
B46E778F9E40864B5D2B2F1C /* leveldb_transaction_test.cc in Sources */,
66FAB8EAC012A3822BD4D0C9 /* leveldb_util_test.cc in Sources */,
Expand Down Expand Up @@ -3811,6 +3820,7 @@
1145D70555D8CDC75183A88C /* leveldb_mutation_queue_test.cc in Sources */,
1DCA68BB2EF7A9144B35411F /* leveldb_opener_test.cc in Sources */,
CD1E2F356FC71D7E74FCD26C /* leveldb_remote_document_cache_test.cc in Sources */,
077292C9797D97D3851F15CE /* leveldb_snappy_test.cc in Sources */,
06485D6DA8F64757D72636E1 /* leveldb_target_cache_test.cc in Sources */,
EC62F9E29CE3598881908FB8 /* leveldb_transaction_test.cc in Sources */,
7A3BE0ED54933C234FDE23D1 /* leveldb_util_test.cc in Sources */,
Expand Down Expand Up @@ -4024,6 +4034,7 @@
FE701C2D739A5371BCBD62B9 /* leveldb_mutation_queue_test.cc in Sources */,
98FE82875A899A40A98AAC22 /* leveldb_opener_test.cc in Sources */,
79D86DD18BB54D2D69DC457F /* leveldb_remote_document_cache_test.cc in Sources */,
82228CD6CE4A7A9254F8E82D /* leveldb_snappy_test.cc in Sources */,
6C388B2D0967088758FF2425 /* leveldb_target_cache_test.cc in Sources */,
D4572060A0FD4D448470D329 /* leveldb_transaction_test.cc in Sources */,
3ABF84FC618016CA6E1D3C03 /* leveldb_util_test.cc in Sources */,
Expand Down Expand Up @@ -4237,6 +4248,7 @@
A478FDD7C3F48FBFDDA7D8F5 /* leveldb_mutation_queue_test.cc in Sources */,
A06FBB7367CDD496887B86F8 /* leveldb_opener_test.cc in Sources */,
A27096F764227BC73526FED3 /* leveldb_remote_document_cache_test.cc in Sources */,
EAC0914B6DCC53008483AEE3 /* leveldb_snappy_test.cc in Sources */,
D04CBBEDB8DC16D8C201AC49 /* leveldb_target_cache_test.cc in Sources */,
29243A4BBB2E2B1530A62C59 /* leveldb_transaction_test.cc in Sources */,
08FA4102AD14452E9587A1F2 /* leveldb_util_test.cc in Sources */,
Expand Down Expand Up @@ -4446,6 +4458,7 @@
98708140787A9465D883EEC9 /* leveldb_mutation_queue_test.cc in Sources */,
8342277EB0553492B6668877 /* leveldb_opener_test.cc in Sources */,
8077722A6BB175D3108CDC55 /* leveldb_remote_document_cache_test.cc in Sources */,
C4548D8C790387C8E64F0FC4 /* leveldb_snappy_test.cc in Sources */,
284A5280F868B2B4B5A1C848 /* leveldb_target_cache_test.cc in Sources */,
35DB74DFB2F174865BCCC264 /* leveldb_transaction_test.cc in Sources */,
BEE0294A23AB993E5DE0E946 /* leveldb_util_test.cc in Sources */,
Expand Down Expand Up @@ -4678,6 +4691,7 @@
4FAD8823DC37B9CA24379E85 /* leveldb_mutation_queue_test.cc in Sources */,
4562CDD90F5FF0491F07C5DA /* leveldb_opener_test.cc in Sources */,
EE6DBFB0874A50578CE97A7F /* leveldb_remote_document_cache_test.cc in Sources */,
978D9EFDC56CC2E1FA468712 /* leveldb_snappy_test.cc in Sources */,
6380CACCF96A9B26900983DC /* leveldb_target_cache_test.cc in Sources */,
DDD219222EEE13E3F9F2C703 /* leveldb_transaction_test.cc in Sources */,
BC549E3F3F119D80741D8612 /* leveldb_util_test.cc in Sources */,
Expand Down
Loading