summaryrefslogtreecommitdiff
path: root/CMake
Commit message (Collapse)AuthorAge
* CMake: Install TESTONLY libraries and their dependencies (#1442)20230125.3Gravatar Mike Kruskal2023-05-04
| | | | | | | | | This patch cherry-picks 807763a7f57dcf0ba4af7c3b218013e8f525e811 #1407 --------- Co-authored-by: Derek Mauro <dmauro@google.com>
* Apply LTS transformations for 20230125 LTS branch (#1370)20230125.rc320230125.0Gravatar Derek Mauro2023-01-25
|
* Separate DLL export/import for test helpers dll, and fix typo.Gravatar Mike Kruskal2023-01-25
| | | | | | | The DLL export issue isn't a problem currently, since we don't explicitly export any symbols from the test dll. This will be an issue in the future though. Additionally, there was a typo in absl_internal_test_dll_contains that caused abseil_test_dll to be empty (and therefore not create a lib file). PiperOrigin-RevId: 504555797 Change-Id: Ic7b50bcbe704f7c8fd44028071abcf5d6babb2cf
* Fix typo in previous AbseilDLL changes, and enable testing.Gravatar Mike Kruskal2023-01-24
| | | | | | | This broke builds of abseil_test_dll, since CMake can't find the file we incorrectly specified. PiperOrigin-RevId: 504372451 Change-Id: I6cd5a44f12bb2f473fae2ac920e047e782ae9524
* Include Abseil logging in windows dll, and add a test helper dll.Gravatar Mike Kruskal2023-01-24
| | | | | | | This was tested with https://github.com/protocolbuffers/protobuf/pull/11623 in Protobuf's windows shared library build. PiperOrigin-RevId: 504294227 Change-Id: I9657197e649a334585bffa2c7bc6340cd2354e84
* Fix pkgconfig generation broken by 14abd930c61ef3ad2842f5c6b7ea60693b0d4ff9Gravatar Derek Mauro2023-01-22
| | | | | | | In the non-dll case, don't set the LNK_LIB variable in the deps loop. PiperOrigin-RevId: 503854597 Change-Id: Ic57711c1ed95b998e6ca4f27a0a7982ee99595e2
* Merge pull request #1341 from h-vetinari:pkgconfigGravatar Copybara-Service2022-12-14
|\ | | | | | | | | PiperOrigin-RevId: 495308617 Change-Id: Ic373a80908e513ce3cc4a9156d49aac8ebf89024
* | Allow Cord to store chunked checksumsGravatar Derek Mauro2022-12-11
| | | | | | | | | | PiperOrigin-RevId: 494587777 Change-Id: I41504edca6fcf750d52602fa84a33bc7fe5fbb48
| * add pkgconfig metadata for shared windows buildsGravatar H. Vetinari2022-12-10
| |
* | Convert the full parser into constexpr now that Abseil requires C++14, and useGravatar Samuel Benzaquen2022-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | this parser for the static checker. This fixes some outstanding bugs where the static checker differed from the dynamic one. Also, fix `%v` to be accepted with POSIX syntax. Tested: Presubmit TGP OCL:487237262:BASE:490275393:1669141454896:92dd62e3 PiperOrigin-RevId: 491650577 Change-Id: Id138c108187428b3aea46f8887495f1da12c91b2
* | CMake: Remove trailing commas in `AbseilDll.cmake`Gravatar Christian Blichmann2022-11-28
| | | | | | | | | | PiperOrigin-RevId: 491266544 Change-Id: I0dd222f6d9fe49f1fdcdb11cf732c13c353e7695
* | Release the CRC libraryGravatar Derek Mauro2022-11-09
| | | | | | | | | | | | | | | | | | This implementation can advantage of hardware acceleration available on common CPUs when using GCC and Clang. A future update may enable this on MSVC as well. PiperOrigin-RevId: 487327024 Change-Id: I99a8f1bcbdf25297e776537e23bd0a902e0818a1
* | Support logging of user-defined types that implement `AbslStringify()`Gravatar Phoebe Liang2022-11-02
| | | | | | | | | | | | | | | | | | If a user-defined type has `AbslStringify()` defined, it will always be used for logging over `operator<<`. `HasAbslStringify` now uses the empty class `UnimplementedSink` for its checks instead of `StringifySink` in order to make it work in cases involving other sinks. PiperOrigin-RevId: 485710377 Change-Id: Ibdd916151c7abc3269c35fbe79b772867f3d25e1
* | CMake: installed artifacts reflect the compiled ABIGravatar Abseil Team2022-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | In a previous change, I forgot to fix the DLLs to also set the target_compile_features() as needed. Some amount of refactoring to expose the necessary variables and functions in AbseilDll.cmake Fixes #1116 PiperOrigin-RevId: 485101834 Change-Id: I5cd0eff9e20c0ddf48c364f917e40d66df0aac17
* | Move internal details from one source file to another more appropriate sourceGravatar Andy Soffer2022-10-27
|/ | | | | | | file. PiperOrigin-RevId: 484419458 Change-Id: Ic2c1afa1a3434ac071c01ae2e6c75dee41b1f069
* Implement function to calculate Damerau-Levenshtein distance between two ↵Gravatar Abseil Team2022-10-17
| | | | | | | strings. PiperOrigin-RevId: 481568970 Change-Id: Icb132348f62fed4c0168aac4963b3313a060890b
* Support stringification of user-defined types in AbslStringify in ↵Gravatar Andy Soffer2022-10-14
| | | | | | | | | | | | | | absl::Substitute. We are also moving some internals into an internal header. `HasAbslStringify` was not previously in an internal namespace but was intended to be and has now been moved to an internal namespace. This is in adherence to our compatibility guidelines which wave requirements for APIs within their first 30 days of public release (See https://abseil.io/about/compatibility for details). PiperOrigin-RevId: 481190705 Change-Id: I4c0c348f269ea8d76ea3d4bd5a2c41cce475dc04
* CMake: Remove check_target calls which can be problematic in case of ↵Gravatar Abseil Team2022-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | dependency cycle Also renames `_target_compile_features_if_available` CMake function to `_absl_target_compile_features_if_available` since CMake's function namespace is global. The dependency cycle can occur if absl is configured with test helpers enabled, and googletest is configured to use absl. In the case that both projects are being built from source via FetchContent with OVERRIDE_FIND_PACKAGE, depending on the order in which the two projects are added to the build, the check_target calls may fail even though the build would have otherwise succeeded. The existing `check_target` calls seem to have been originally added to detect missing gtest targets when the `GTest::` prefix was not yet in use. For target names without "::", CMake does not warn if they are undefined, and just assumes they refer to system library names. However, CMake does fail during build generation if a target name with "::" is missing; thus the check_taget calls are redundant. PiperOrigin-RevId: 480140797 Change-Id: Ic51631e4a36dd8b6f569ad6424bea15a4af0b875
* Add common_policy_traits - a subset of hash_policy_traits that can be shared ↵Gravatar Evan Brown2022-09-28
| | | | | | | | | | between raw_hash_set and btree. Also remove the transfer implementations from btree_set.h and flat_hash_set.h, which are equivalent to the default implementations. Motivation: this will simplify upcoming changes related to trivial relocation. PiperOrigin-RevId: 477493403 Change-Id: I75babef4c93dec3a8105f86c58af54199bb1ec9c
* Split configuration related to cycle clock into separate headersGravatar Abseil Team2022-09-26
| | | | | PiperOrigin-RevId: 477043101 Change-Id: I009ea39ad61e7e78cdac51afc57a8ad5b4d8aa2d
* CMake: Require at least CMake 3.10Gravatar Derek Mauro2022-09-07
| | | | | | | | This is the current minimum according to https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md PiperOrigin-RevId: 472714045 Change-Id: I5930bbbc4eec4644d22bba703957d1764c2e76be
* CMake: install artifacts reflect the compiled ABIGravatar Abseil Team2022-09-06
| | | | | | | | | | | | | | | | | | Change `absl/base/options.h` at install time to reflect the ABI used to compile the libraries, i.e., if Abseil was compiled with C++ >= 17 then the `ABSL_OPTION_USE_STD_*` macros are set to `1`, because then the C++ 17 types are embedded in the ABI of the installed artifacts. Likewise, set the `target_compile_features()` of Abseil libraries to reflect the C++ version used to compile them. If they the Abseil libraries are compiled with C++ >= 17, then all downstream dependencies must also be compiled with C++ >= 17. Fixes #696 PiperOrigin-RevId: 472538165 Change-Id: Ic9e346ebe277c882a18ad96e1918c9e3511c91c3
* Compile all dependencies of the DLL with ABSL_CONSUME_DLLGravatar Isuru Fernando2022-09-02
|
* CMake: Add an option to build the libraries that are used for writingGravatar Derek Mauro2022-08-29
| | | | | | | | | | | | | | | | tests without requiring Abseil's tests be built (default=OFF) This disables building libraries that are only used for writing tests by default. The logging library releases some libraries used for writing tests that themselves depend on GoogleTest. This allows Abseil to build by default without requiring GoogleTest. Fixes #1262 PiperOrigin-RevId: 470847215 Change-Id: I296f41aa06d6f302853af3f32e1f762649504afc
* Support compilers that are unknown to CMakeGravatar Abseil Team2022-08-22
| | | | | | | | | | | | Abseil failed to configure with `ABSL_PROPAGATE_CXX_STD` if the compiler was not known to CMake: target_compile_features no known features for CXX compiler Turns the error into a warning by checking `CMAKE_CXX_COMPILE_FEATURES` before calling `target_compile_features`. PiperOrigin-RevId: 469254470 Change-Id: Ifba006dcdbf6a7112e382075b24678a792dbc827
* add new CMake option `ABSL_USE_SYSTEM_INCLUDES`Gravatar Evan Cox2022-08-11
| | | | | When using Abseil as a dependency with CMake, files that include Abseil headers and have incompatible warning settings can emit compiler warnings. CMake allows you to mark include directories as `SYSTEM` includes, which causes compilers to ignore warnings from those headers. This adds the new option `ABSL_USE_SYSTEM_INCLUDES`, which makes Abseil's include directories be marked with `SYSTEM`.
* Sort INTERNAL_DLL_TARGETS for easier maintenance.Gravatar Gennadiy Rozental2022-08-09
| | | | | PiperOrigin-RevId: 466492826 Change-Id: I610fb7f6bbdb682558046c6ae995bcc07ba6f98a
* Merge pull request #1216 from brjsp:masterGravatar Copybara-Service2022-07-12
|\ | | | | | | | | PiperOrigin-RevId: 460478343 Change-Id: I58e2e1fb7b1776f37b1254ba5fd74d56b44cb4d0
| * Do not leak -maes -msse4.1 into pkgconfigGravatar Bruno Pitrus2022-07-11
|/
* Move Abseil to C++14 minimumGravatar Derek Mauro2022-07-06
| | | | | | | | | | Adds policy checks the raise the minimum C++ version to C++14 and the minimum GCC version to GCC 5 Updates the docs to indicate the C++14 minimum. PiperOrigin-RevId: 459401288 Change-Id: I18878f0e13001c57e97e26ad7c9a9c9c12c39265
* Release absl::AnyInvocableGravatar Dino Radakovic2022-06-16
| | | | | | | | AnyInvocable is a C++11 compatible equivalent of the C++23 [std::move_only_function](https://en.cppreference.com/w/cpp/utility/functional/move_only_function/move_only_function). Although this implementation matches an intermediate draft revision of the standard (http://wg21.link/p0288r5), it is neither a standard tracking type nor a seamless backfill type. PiperOrigin-RevId: 455494585 Change-Id: If01565f8eecc78eee38fb794ef142b32b31abc7c
* Release absl::CordBufferGravatar Derek Mauro2022-06-06
| | | | | | | | | absl::CordBuffer holds data for eventual inclusion within an existing absl::Cord. CordBuffers are useful for building large Cords that may require custom allocation of its associated memory, a pattern that is common in zero-copy APIs. PiperOrigin-RevId: 453212229 Change-Id: I6a8adc3a8d206691cb1b0001a9161e5080dd1c5f
* Don’t use generator expression to build .pc Libs linesGravatar Benjamin Barenblat2022-05-24
| | | | | | | | | | | When building pkg-config files, compute linker flags with a string substitution rather than the JOIN generator expression. This ensures that commas in linker flags don’t get treated as argument separators in JOIN. Bug: https://bugs.debian.org/1011294 PiperOrigin-RevId: 450675966 Change-Id: I61eacc46a468bae5ff3dae2b437a564f2f1042c2
* Export of internal Abseil changesGravatar Abseil Team2022-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 3d018c03a34bf273a4b24b3584ed77f0a6d21686 by Abseil Team <absl-team@google.com>: Fix a spelling typo (s/boundries/boundaries). PiperOrigin-RevId: 442041877 Change-Id: I608020697d37b85316bb9a0838e4b457659c926c -- 518b8119e51db24ce7fb0fd2fe537ec43825c3e6 by Dino Radakovic <dinor@google.com>: absl/types/internal/variant: Make include guard uppercase https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 441911692 Change-Id: I9837dd07f20204d8253f20627b0917a34dc21825 -- b91696c38310a7cae8c1ea9e2d479495f5dc3f69 by Greg Falcon <gfalcon@google.com>: Add an internal-only API to wrap __builtin_prefetch() if available. This private API is intended for future use by the Abseil implementation. Like any internal-namespaced function, it may be changed or removed at any time. PiperOrigin-RevId: 441894616 Change-Id: Iaa48bd4680b373f4a0d5afab0cb35e2a1908595f -- 0f01e8b0551a662e02dff60840c54320f987315f by Derek Mauro <dmauro@google.com>: C++20: Use the standard `constinit` keyword for `ABSL_CONST_INIT` when available PiperOrigin-RevId: 441778874 Change-Id: I70c616469752ff23b326b1c615437599f42cc6aa GitOrigin-RevId: 3d018c03a34bf273a4b24b3584ed77f0a6d21686
* Export of internal Abseil changesGravatar Abseil Team2022-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f4c7e510922668c68be4aa79a00867c3d3ca9f95 by Derek Mauro <dmauro@google.com>: Many improvements to LeakChecker builds The presence of the LeakChecker is now detected when possible. GCC users using LeakChecker in standalone mode still need to use -DLEAK_CHECKER. This is now documented in the header. The hacky targets used for testing leak checking have been removed in favor of testing in AddressSanitizer mode on Kokoro. Fixes #885 Fixes #1153 PiperOrigin-RevId: 441203393 Change-Id: Ibe64ef6b104bcaf31839ff7184e558cc86abdd1c -- 5c70a23aa83b8152ab95d2cf21662fc63c80ef7d by Abseil Team <absl-team@google.com>: Add a benchmark for stacktrace PiperOrigin-RevId: 441196473 Change-Id: I4c9aa2e797aa2cae09abfaaee3abe5c09eb62fc4 -- 50b406052273b9d5bad04a7860a96e4d5d956c02 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 441114481 Change-Id: I667af7a50d5631ca91289dd24c91ba90233e0184 -- 568b4eaac120b420bce5290179d407d2b57d5bae by Dino Radakovic <dinor@google.com>: Internal change PiperOrigin-RevId: 440894155 Change-Id: Ia587ffc65a8321126585fb363b7c0ca8cc2a0da2 -- d53948eace4f3a10ac5a6c1496dc51b81adc412c by Abseil Team <absl-team@google.com>: Explicitly give internal linkage to symbols which are not used outside of their translation units. PiperOrigin-RevId: 440424519 Change-Id: I531c5e229d443375483b7550a34f48042589a99b GitOrigin-RevId: f4c7e510922668c68be4aa79a00867c3d3ca9f95
* Export of internal Abseil changesGravatar Abseil Team2022-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 291f7ef542f73e4801ab5108014bc02344ef31df by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 437835981 Change-Id: I42fd92e74903894533ac9984d7f622e3ba20f468 -- 2e8caf1a57c50b518e05b4bca48e4fe1bb19af82 by Andy Getzendanner <durandal@google.com>: Internal change PiperOrigin-RevId: 437832673 Change-Id: I61b35089418d01a54cecf161b254b68252bebff3 -- b927482ccc399f7e337b60582988b914d9946e4e by Derek Mauro <dmauro@google.com>: Simplify endian intrinsics for modern compilers All modern compilers have either __builtin_bswapN (gcc, clang) or _byteswap_TYPE (MSVC). The other intrinsic definitions are no longer necessary. PiperOrigin-RevId: 437772295 Change-Id: Ifb3d88ba24b9097f87ceb202272b36d2f5e5117f -- b6782a2247a16d5c14706a74ec577c19963d9f97 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 437373174 Change-Id: I0f77e1780dee90d7a3c32a08d96c4aeb624a57b4 -- a53e0c724e37b0b01515a99bd25394b8e21ffdfc by Derek Mauro <dmauro@google.com>: Unify detection of SSE2 and SSSE3 instruction sets and include the proper headers Fix the intrinsic implementation of FastHexToBufferZeroPad16 in numbers.h which only relies on SSSE3, not SSE 4.2. https://godbolt.org/z/Pf5bn1Yv9 Closes #639 PiperOrigin-RevId: 437286940 Change-Id: Ic97948399b61b91e9c0bccd09313b795b904d714 -- f173f597cb2a75ef2a989f45a496334b85e6f40d by Abseil Team <absl-team@google.com>: Change assertion function to enable clearer error messages. PiperOrigin-RevId: 437227057 Change-Id: If420d2f63b51feef6648762f344d5be012cd9c85 GitOrigin-RevId: 291f7ef542f73e4801ab5108014bc02344ef31df
* Export of internal Abseil changesGravatar Abseil Team2022-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ed829ac612f090375427c3488827c6e74deb2e3f by Derek Mauro <dmauro@google.com>: Update latest GCC/Clang Linux tests to Bazel 5.0.0 and CMake 3.22.2 PiperOrigin-RevId: 429369775 -- 76952303c4d942288c4e7657ffb5893cec54a132 by Martijn Vels <mvels@google.com>: Optimize Cord::ChunkIterator now that CordRepConcat is removed PiperOrigin-RevId: 429321455 -- dcd0d287793649aba9b98268c5783e449a34749f by Martijn Vels <mvels@google.com>: Add IsDataEdge() and DataEdgeValue() helper functions. This moves repetitive logic accessing data edges into its own header, and more strongly defines the notion of what a data edge is, enforcing the internal invariants. This will also be incorporated in optimized Cord iteration logic once CordRepConcat is totally removed from the Cord code. PiperOrigin-RevId: 429307248 -- 6a0903962155988085bf8656743fda9c4cdcba6c by Abseil Team <absl-team@google.com>: Make it clear that the probability function given for the zipf distribution is unnormalized, i.e., sum(p(x) for x = 0..k) != 100%. Quoting Section 7 of the paper cited in the comments, where this formula comes from (emphasis mine): "We will consider the two parameter generalization as defined in Dagpunar [1988] with the *unnormalized* probability function ..." PiperOrigin-RevId: 429068258 -- 3899ff6d444ba755148bc521a6ee031d9e9d4485 by Abseil Team <absl-team@google.com>: Internal Changes PiperOrigin-RevId: 428644856 -- 319de702d2b537cbb76c4c71277ae89b349b162e by Benjamin Barenblat <bbaren@google.com>: Support symbolization on PA-RISC Null out supervisor bits in PA-RISC addresses before symbolizing, and handle function descriptor tables correctly. Change symbolize_test.cc to use 32-bit aligned addresses, allowing that test to pass on PA-RISC. PiperOrigin-RevId: 428590564 GitOrigin-RevId: ed829ac612f090375427c3488827c6e74deb2e3f Change-Id: Ie01ff3b9365fd45e5a55f858038552679f3180d3
* Export of internal Abseil changesGravatar Abseil Team2022-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ceee18732f9499d3a53d46d5974f12ea0774b900 by Abseil Team <absl-team@google.com>: Remove division from the profile guided optimization PiperOrigin-RevId: 428444108 -- fc27059f1b0c0b4cb8ddd9a7a88220af52c0c755 by Evan Brown <ezb@google.com>: Rename btree_node::leaf to is_leaf and also add is_internal for readability improvements. PiperOrigin-RevId: 428076422 -- 6a90d18477cc3a6de84282b6e38d6f294aa72748 by Evan Brown <ezb@google.com>: In sanitizer mode, add generation integers to b-tree nodes and iterators and validate that iterators have not been invalidated already when they're used. Even though generation integers are stored in all nodes, we only use the one stored in the root node for validation. The reason we keep one in all the nodes is that nodes can become a root node after they are allocated. Also change the order of args in init_leaf to not violate the style guide. PiperOrigin-RevId: 428054226 -- ede4a0f676f43e7003fd2599c263d55222e760ba by Martijn Vels <mvels@google.com>: Physically remove CordRepConcat This CL removes all uses of CordRepConcat. This change is executed by removing all the dead 'btree_enabled()' and 'IsConcat' branches, and all subsequent dead code. This change explicitly does not optimize any of the remaining code other than the most trivial ones such as removing 'stack' loop vars and loops. PiperOrigin-RevId: 428002308 -- 7cc83d96118149cf1aa1258a066b8fd4517df5f6 by Evan Brown <ezb@google.com>: Change btree_iterator from a struct to a class. Motivation: btree_iterator has private members and invariants so it should be a class. Also merge two private sections. PiperOrigin-RevId: 427768836 -- 524d478b0af422e1a867a8823d9fbad149030360 by Martijn Vels <mvels@google.com>: Physically block the creation of new CordRepConcat nodes. This change removes CordRepConcat creation, issuing a FATAL errors on the (practically impossible) call path on broken invariants. This change is deliberately limited in impact, subsequent changes will be more voluminous ripping out the (now dead) CordRepConcat code. PiperOrigin-RevId: 427741022 -- e21eb354c1bb358ea8b64d0e3fbb378e87b8b8c4 by Derek Mauro <dmauro@google.com>: Update the implementation of ABSL_DEPRECATED to work with GCC, and recommend using the standard attribute [[deprecated]] for C++14 and newer GCC users that are experiencing new warnings can silence them with -Wno-deprecated-declatations. GCC users that want to see the warnings but not error on them can use -Wno-error=deprecated-declarations. PiperOrigin-RevId: 427228952 -- 0ab4ee5660f3a072054dc4ab5056925c26977c7a by Laramie Leavitt <lar@google.com>: Change comment to avoid overflow. PiperOrigin-RevId: 427090218 GitOrigin-RevId: ceee18732f9499d3a53d46d5974f12ea0774b900 Change-Id: Ida00477b6a3d02a8b7bb467be7621b618385d1e9
* cmake: make `random_mocking_bit_gen` library public. (#1084)Gravatar Andrei Polushin2022-01-07
| | | | | | | An external project may depend on an Abseil `TESTONLY` library like `absl::random_mocking_bit_gen`. Such a library should not be excluded from build when Abseil's own tests are not built. fixes #997
* Export of internal Abseil changesGravatar Abseil Team2021-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 81f95fcf85b75b84f9892c73123501472b9cff33 by Martijn Vels <mvels@google.com>: Introduce GetEstimatedMemoryUsage(CordMemoryAccounting::kFairShare) Memory usage analysis is moved into a separate cord_analysis.cc source. PiperOrigin-RevId: 416370158 -- 6bc7b1348fd27fe53f100c9eabd47f4f2cb9c19c by Abseil Team <absl-team@google.com>: Support scoped enum in absl::Substitute. PiperOrigin-RevId: 416345422 -- 6399f4f6ae05ebcd67664ebd844902f699ab8ec7 by Abseil Team <absl-team@google.com>: Correct the computation of contention cycles Currently, we record contention cycles from the first time a thread started waiting on a mutex. Consider a situation in which two threads, T1 and T2, run a loop at the top of which they acquire a common mutex and release it at the end of the loop body. Further assume that T2 is never able to acquire the mutex as T1 repeatedly acquires and then releases the mutex. In this case, we would expect that the reported contention cycles would be increase linearly over time. But currently we observe a quadratic behavior in the reported waiting time as mentioned in b/14684244#comment10. To fix the issue, this CL records the contention cycles experienced by all the threads woken up when the mutex is released. Further, contention_start_cycles is set to the current time since the contention cycles for the time already passed has been taken into account. With this CL, we get a linear increase in the waiting time, the expected behavior. PiperOrigin-RevId: 416322593 -- 149c1637c8a0f1a38e5a8f9f27e5803a2015a554 by Jorg Brown <jorg@google.com>: Make Status::EmptyString more efficient by constructing it in global space, rather than on the heap. See https://godbolt.org/z/8M9n7YqcY for reduced code size. PiperOrigin-RevId: 416307833 -- 3b4562a8be5a3c80077cb67b0a32c97419058380 by Abseil Team <absl-team@google.com>: Clarify the usage of RegisterMutexProfiler PiperOrigin-RevId: 416146130 GitOrigin-RevId: 81f95fcf85b75b84f9892c73123501472b9cff33 Change-Id: Iccb72d7ee617e6ebe226a38170d62e0849b43480
* cmake: add ABSL_BUILD_TESTING option (#1057)Gravatar Matt Armstrong2021-12-10
| | | | | | | | | | | | | | | | | | | | | Abseil's own tests now are disabled if either BUILD_TESTING or a new option called ABSL_BUILD_TESTING is false. Additionally, Abseil's CMakeLists.txt no longer re-declares the BUILD_TESTING option with a value of false. Abseil had been using just the BUILD_TESTING option, since the fix for #901. Because setting BUILD_TESTING false still works to disable Abseil's tests, this change preserves the behavior asked for in that issue. Previous to that, Abseil had a project specific flag for this, as is the typical idiom used in other projects. The issue with BUILD_TESTING is that it is an all-or-nothing policy. When Abseil is incorporated as a subproject, the encompasing project has no convenient way to enable its own tests while disabling Abseil's. Fixes #1056
* Export of internal Abseil changesGravatar Abseil Team2021-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 2130ba98c8359b08d97fb16d84dfd05687005dcf by Abseil Team <absl-team@google.com>: Tweaking the documentation of c_all_of to state the effect more directly. PiperOrigin-RevId: 410557900 -- 4732289bf4b56123fed113e36be4710b55c6a6c7 by Greg Falcon <gfalcon@google.com>: Improve the quality of absl::Hash<std::vector<bool>>. This previously dispatched to std::hash<vector<bool>>, which suffers from trivial collisions on many platforms. (They often hash the internal words but no size info, so that, e.g., {1, 1} and {1, 1, 0} collide.) Also extended the unit test to exercise this. PiperOrigin-RevId: 410329943 -- 1c5f3934230a7669f74c96b305251786a265e235 by Greg Falcon <gfalcon@google.com>: Add broader testing of absl hash contracts in the hash unit test. In particular, test that the hash erasure mechanism works. PiperOrigin-RevId: 410312738 -- 5e1923f527ed3d02f6752a5b38d5e1c17a4a146f by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 410290663 -- 8c74bc962b3b98a5908017c345efc592393048ea by Martijn Vels <mvels@google.com>: Add Cord::CreateFlat() function PiperOrigin-RevId: 410260776 -- bd0de4e94c85620d3b8dd60fae367b730fc4cb34 by Evan Brown <ezb@google.com>: Rename node_hash_policy to node_slot_policy. Motivation: we can potentially reuse this code for node_btree_*. PiperOrigin-RevId: 410082271 GitOrigin-RevId: 2130ba98c8359b08d97fb16d84dfd05687005dcf Change-Id: Ie052084cf992dee250d8b2f388d39c4de0dcff40
* Export of internal Abseil changesGravatar Abseil Team2021-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 83e4cdf03a4d702b30e69204060de09e462e23c6 by Greg Falcon <gfalcon@google.com>: Revert the crc addition to RefcountAndFlags, and restore related comments to their original state. In development, the implementation of SetExpectedCrc() changed, and there is no longer a need to track the CRC status in the refcount. Since the distinction between IsOne() and IsMutable() is subtle *and unused*, removing it now can help avoid subtle bugs in the future. This distinction can always be added back later, if it proves necessary. Keep the reserved bit for now; all it costs is one extra mask instruction in the refcount checks, and space for extra state in Cord is always hard to find. PiperOrigin-RevId: 408647038 -- ee67585cf66954176615271f50f8b278119dd138 by Greg Falcon <gfalcon@google.com>: Implement Cord::SetExpectedChecksum() and Cord::ExpectedChecksum(). SetExpectedChecksum() will store a uint32_t out-of-band alongside a Cord's data. This value persists through copies and assignments. Mutating operations on a Cord cause the value to be forgotten. ExpectedChecksum() retrieves the stored value, if present. This API is intended for storing a CRC32C checksum alongside data, allowing checksums to be passed through dataflows and validated at the final step. However, this API is agnostic to the meaning of the stored value. No CRC32C validation is performed by these new APIs. This implementation adds a new CordRep node, CordRepCrc. A CordRepCrc may (currently) only live at the top of a tree. This allows traversal logic to be agnostic to these nodes, instead putting the needed branches at the mutation level. This also implements the property requested from API review, that any mutation is guaranteed to permanently forget the stored CRC. PiperOrigin-RevId: 408611221 -- a86f592402b37c854ebdc77d2b9b425451a7a675 by Martijn Vels <mvels@google.com>: Move 'ExtractResult' into CordRep The result of an extract operation is logically identical for any tree implementation, and having a single type makes 'tree independent' implementation in cord.cc more concise. PiperOrigin-RevId: 408332408 -- baa7647e21db59a87f75af9cac62172ce38a0f71 by Abseil Team <absl-team@google.com>: Replace usages of `assert` macros with `ABSL_HARDENING_ASSERT`. PiperOrigin-RevId: 408272133 -- c7658133d8662c39fa5035fc93a364c7c3d327e0 by Martijn Vels <mvels@google.com>: Add CordRepBtree::ExtractAppendBuffer PiperOrigin-RevId: 407944179 -- 5775100363b5890ebfe710fadebf040445eab991 by Martijn Vels <mvels@google.com>: Add CordRepConcat::ExtractAppendBuffer PiperOrigin-RevId: 407932968 -- 9f520ba1600a93352c78f644a369c7c76195ee86 by Greg Falcon <gfalcon@google.com>: Add cordz tracking for crc nodes. This also adds a new kSetExpectedChecksum method to the list of tracked methods. This is presently unused but will be used soon. PiperOrigin-RevId: 407884120 GitOrigin-RevId: 83e4cdf03a4d702b30e69204060de09e462e23c6 Change-Id: I134ace2d87215813eaa60a282996a33884676c06
* Export of internal Abseil changesGravatar Abseil Team2021-11-04
| | | | | | | | | | | | | | | | | | | | | | | | -- 5e45aadfb89e366dedd1fcad5034a76c5c10ad76 by James Y Knight <jyknight@google.com>: Correct the conditions for std::{optional,variant,any} availability on Apple platforms. Before XCode 12.5, the availability declarations incorrectly excluded one release on which the features were in fact available. This was corrected in https://github.com/llvm/llvm-project/commit/7fb40e1569dd66292b647f4501b85517e9247953 Unfortunately, we cannot simply switch abseil to the corrected versions, as that will cause build failures when using the older XCode toolchain. So, we check the version, and choose the correct set of versions for the toolchain in use. PiperOrigin-RevId: 407667302 -- 376fa06cde048e536e9447336b27bebf598ed4ea by Greg Falcon <gfalcon@google.com>: Cord implementation change: Add a new CordRepCrc node type. This is an implementation detail that will allow storing expected CRCs alongside cord data. This node is intended only to live at the top of Cord trees. PiperOrigin-RevId: 407587140 GitOrigin-RevId: 5e45aadfb89e366dedd1fcad5034a76c5c10ad76 Change-Id: Iea3ca001c0cbb4deec8286b5581b30dc172a9918
* Export of internal Abseil changesGravatar Abseil Team2021-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | -- 9f6ef337f282272bc098330c9ccacd9d39155db4 by Abseil Team <absl-team@google.com>: Make DestroyElements an empty function if the value types are trivially deconstructible. PiperOrigin-RevId: 407345743 -- a639bbf6f22446d6ba3da9e2c205e26cda4bebc5 by Derek Mauro <dmauro@google.com>: Add ctest --output-on-failure to the CMake install test PiperOrigin-RevId: 407333671 -- 54d0577fa6ba1159c6a86410ae185c52f4afaff6 by Derek Mauro <dmauro@google.com>: Fix Android build of elf_mem_image.cc PiperOrigin-RevId: 407331032 GitOrigin-RevId: 9f6ef337f282272bc098330c9ccacd9d39155db4 Change-Id: I7e13f01cd804aec50f280ac25934c9ec48ef3c5f
* Export of internal Abseil changesGravatar Abseil Team2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 17141711ee419daa597a9f31e73721f80143e55a by Gennadiy Rozental <rogeeff@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 401384949 -- ac48584a7b16e8a12e26d49deb6cddec584a20b5 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 401337785 -- 8a51bb7c962845e0707240c5ba12c1b80f6fbbe9 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 401047691 -- 8e18024510869247f3c04c7807c93709eca2322a by Chris Kennelly <ckennelly@google.com>: Note that SpinLock does not guarantee priorities for wakeups. PiperOrigin-RevId: 400999238 -- 75bc09b5f95fbb74b74d14c370bfb80011e8fb7f by Derek Mauro <dmauro@google.com>: Add visibility restrictions to some internal targets PiperOrigin-RevId: 400718253 -- 1de5061016bc42cd7be009c9725ed2343ce12e3d by Abseil Team <absl-team@google.com>: Make it clear that operator<< can also be used in place of ToString when logging absl::Status. PiperOrigin-RevId: 400248269 -- cda15d9dc6e5cd569de7e5e73f409b72a3caed51 by Abseil Team <absl-team@google.com>: Minor cleanup PiperOrigin-RevId: 400087535 -- b001375ec47da3a0434be9ca9a45c0df510e7dda by Abseil Team <absl-team@google.com>: Move periodic_sampler from base/internal to profiling/internal PiperOrigin-RevId: 400038533 -- e7e02e686abc3900e723080849a3607d190ef57f by Abseil Team <absl-team@google.com>: Move exponential_biased from base/internal to profiling/internal PiperOrigin-RevId: 400020329 GitOrigin-RevId: 17141711ee419daa597a9f31e73721f80143e55a Change-Id: I10924df7e1cc198447813dbe97a374a5cef66b49
* Export of internal Abseil changesGravatar Abseil Team2021-09-13
| | | | | | | | | | | | | | | | | | -- ca3a0009e675b699b5d6dd41f00ebac0e7d1935c by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 396475923 -- 04d9fff79085bb18612af3da49007907394ae0b6 by Abseil Team <absl-team@google.com>: Move HastablezSampler from container/internal to profiling/internal. PiperOrigin-RevId: 396362093 GitOrigin-RevId: ca3a0009e675b699b5d6dd41f00ebac0e7d1935c Change-Id: I42d6d2944786afa24259fde002fed5e611f4e1f9
* Export of internal Abseil changesGravatar Abseil Team2021-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f73e17cb24f7878933fc100bd9bfc39fce190b64 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 394306402 -- 3d3eeffa4e37f63aa50fec1b90858043b40fe377 by Abseil Team <absl-team@google.com>: Release a few more absl::Cord unit tests that were accidentally omitted from the OSS release before. PiperOrigin-RevId: 394016464 -- 8a77a8eb93d021aadd8fdf43e219bf35328001ad by CJ Johnson <johnsoncj@google.com>: Fix typo in identifier PiperOrigin-RevId: 394000560 -- d87206c7c8e045b03d74b91e47ef3db0eb47a17b by Derek Mauro <dmauro@google.com>: Fix typo: RandenHwAes PiperOrigin-RevId: 393879427 -- 980a3402eea77b0c77fb20dd124203002ff791ba by Derek Mauro <dmauro@google.com>: Adds macros `ABSL_LTS_RELEASE_VERSION` and `ABSL_LTS_RELEASE_PATCH_LEVEL` to allow projects to detect if an LTS version is being used. Fixes #1006 PiperOrigin-RevId: 393807178 -- aecc7ed34de718c64733dab76621eacb5af9af5f by CJ Johnson <johnsoncj@google.com>: Change `alloc` to `allocator` to match the fact that other identifiers are full words PiperOrigin-RevId: 393794869 -- ad754bbcf7b78f5d51ed5f39193ac3159429b2b4 by Derek Mauro <dmauro@google.com>: Remove self-include of cord_rep_btree.h PiperOrigin-RevId: 393792085 -- f8e937a0d8fe26400560754f3596e3c21bb6d0d7 by Abseil Team <absl-team@google.com>: Fix trivial typo in comment. PiperOrigin-RevId: 393770527 -- 7a58ca5d708038d222c6a2b6ff5076b4ceffd370 by Tomas Dzetkulic <dzetkulic@google.com>: Update Cord::AppendArray resize policy. PiperOrigin-RevId: 393362184 -- 316050d171190d9d6312cadf88b1cc2db2d1caa7 by Abseil Team <absl-team@google.com>: Add a new top level profiling/ directory to the Abseil library PiperOrigin-RevId: 393358109 -- 0dbb8e10f7fa4a7ac74e12b178e936a67b266c51 by CJ Johnson <johnsoncj@google.com>: Switch to the more common enable_if pattern of ` = 0` in InlinedVector PiperOrigin-RevId: 393301549 -- 136d3068ce33b50ac820e8bd01395a7164d5181f by Abseil Team <absl-team@google.com>: Clean up typedefs in internal/inlined_vector.h PiperOrigin-RevId: 393181754 GitOrigin-RevId: f73e17cb24f7878933fc100bd9bfc39fce190b64 Change-Id: I0c4cd4d71d97bd1bf651701b6302ea3d9ac59b66
* Export of internal Abseil changesGravatar Abseil Team2021-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb by Derek Mauro <dmauro@google.com>: Use the Bazel @platforms repository for platform constraints Fixes #1000 PiperOrigin-RevId: 390644226 -- b34e4d2f8a86b54bd483ec4c9c3dd781ad2d8b68 by Abseil Team <absl-team@google.com>: debugging: add some handling for RISC-V The RISC-V architecture uses a downward growing stack and can host Linux using ELF files. Adjust a few sites accordingly to indicate how to handle the RISC-V architecture. PiperOrigin-RevId: 390631894 -- 5fa3a0961bf3dd0799c048956a0128f7b8113f1e by Samuel Benzaquen <sbenza@google.com>: Rename the buffer hash function to LowLevelHash. Although it started as wyhash, it will depart from it so it does not make sense to keep the name. PiperOrigin-RevId: 390483506 -- 2e7867a2301d58ad4cd5abcaa5fd6f0db973ae7b by Abseil Team <absl-team@google.com>: This is an internal change. PiperOrigin-RevId: 390349746 GitOrigin-RevId: 3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb Change-Id: I322c3762552a2107e6c6b108c25c01e5efa8aecd
* CMake: option to use cxx_std_11 (minimum) that propagates. (#986)Gravatar Eric Barndollar2021-07-29
| | | | | | | | | See https://github.com/abseil/abseil-cpp/issues/259 for context. This change introduces the ABSL_PROPAGATE_CXX_STD option (default to OFF for now, though it prints a warning in CMake 2.8+ builds that a future Abseil release will default to ON). When enabled, all Abseil CMake targets will set the cxx_std_11 target meta feature (which will then propagate to targets that depend upon Abseil) rather than setting the target-level CXX_STANDARD property to CMAKE_CXX_STANDARD (which is the default value anyway), which doesn't propagate. Updates README documentation to clarify behavior and with a different example recommendation for library projects (which should generally leave CMAKE_CXX_STANDARD to the root application project). See https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/ for a useful overview of these different CMake features surrounding C++ standard version configuration.