[openscreen] Roll third_party/abseil/src/ 53e6dae02..dd4c89bd6

Rolls to the LTS release, to get rid of one use of std::aligned_storage,
deprecated in C++23.
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+log/53e6dae02bf0..dd4c89bd657f

$ git log 53e6dae02..dd4c89bd6 --date=short --no-merges --format='%ad %ae %s'
2025-01-23 761129+derekmauro Fix potential integer overflow in hash container create/resize (#1811)
2024-08-01 761129+derekmauro Update GoogleTest dependency to 1.15.2 (#1736)
2024-07-25 761129+derekmauro Cherry-picks for Release Candidate 2 (#1727)
2024-07-22 761129+derekmauro Apply LTS transformations for 20240722 LTS branch (#1724)
2024-07-22 dmauro Fix LINT.IfChange syntax
2024-07-18 eltociear PR #1720: Fix spelling mistake: occurrance -> occurrence
2024-07-18 absl-team Add missing include for Windows ASAN configuration in poison.cc
2024-07-18 dmauro Delete absl/strings/internal/has_absl_stringify.h now that the GoogleTest version we depend on uses the public file
2024-07-18 dmauro Update versions of dependencies in preparation for release
2024-07-15 aaron.bray PR #1699: Add option to build with MSVC static runtime
2024-07-15 absl-team Remove unneeded 'be' from comment.
2024-07-15 arnaud.botella PR #1715: Generate options.h using CMake only once
2024-07-14 gregpataky Small type fix in absl/log/internal/log_impl.h
2024-07-11 arnaud.botella PR #1709: Handle RPATH CMake configuration
2024-07-11 whiteshell2544 PR #1710: fixup! PR #1707: Fixup absl_random compile breakage in Apple ARM64 targets
2024-07-11 50274155+EduMenges PR #1695: Fix time library build for Apple platforms
2024-07-10 mkruskal Remove cyclic cmake dependency that breaks in cmake 3.30.0
2024-07-10 ezb Roll forward poisoned pointer API and fix portability issues.
2024-07-10 lar Use GetStatus in IsOkAndHoldsMatcher
2024-07-10 whiteshell2544 PR #1707: Fixup absl_random compile breakage in Apple ARM64 targets
2024-07-09 foss PR #1706: Require CMake version 3.16
2024-07-07 dmauro Add an MSVC implementation of ABSL_ATTRIBUTE_LIFETIME_BOUND
2024-07-03 absl-team Mark c_min_element, c_max_element, and c_minmax_element as constexpr in C++17.
2024-07-03 rogeeff Optimize the absl::GetFlag cost for most non built-in flag types (including string).
2024-07-03 durandal Encode some additional metadata when writing protobuf-encoded logs.
2024-07-02 absl-team Replace signed integer overflow, since that's undefined behavior, with unsigned integer overflow.
2024-07-01 absl-team Make mutable CompressedTuple::get() constexpr.
2024-07-01 maskray vdso_support: support DT_GNU_HASH
2024-07-01 absl-team Make c_begin, c_end, and c_distance conditionally constexpr.
2024-07-01 cbeattie Add operator<=> comparison to absl::Time and absl::Duration.
2024-07-01 dmauro Deprecate `ABSL_ATTRIBUTE_NORETURN` in favor of the `[[noreturn]]` standardized in C++11
2024-07-01 dmauro Rollback new poisoned pointer API
2024-07-01 absl-team Static cast instead of reinterpret cast raw hash set slots as casting from void* to T* is well defined
2024-06-27 dmauro Fix absl::NoDestructor documentation about its use as a global
2024-06-27 cmihelic Declare Rust demangling feature-complete.
2024-06-27 cmihelic Split demangle_internal into a tree of smaller libraries.
2024-06-27 cmihelic Decode Rust Punycode when it's not too long.
2024-06-27 goldvitaly Add assertions to detect reentrance in `IterateOverFullSlots` and `absl::erase_if`.
2024-06-26 cmihelic Decoder for Rust-style Punycode encodings of bounded length.
2024-06-26 absl-team Add `c_contains()` and `c_contains_subrange()` to `absl/algorithm/container.h`.
2024-06-26 absl-team Three-way comparison spaceship <=> operators for Cord.
2024-06-26 absl-team internal-only change
2024-06-25 ezb Remove erroneous preprocessor branch on SGX_SIM.
2024-06-24 ezb Add an internal API to get a poisoned pointer.
2024-06-24 absl-team optimization.h: Add missing <utility> header for C++
2024-06-24 dmauro Add a compile test for headers that require C compatibility
2024-06-24 ajlai Fix comment typo
2024-06-24 tjagtap Expand documentation for SetGlobalVLogLevel and SetVLogLevel.
2024-06-22 absl-team Roll back 6f972e239f668fa29cab43d7968692cd285997a9
2024-06-22 poconnell93 PR #1692: Add missing `<utility>` include
(...)
2024-03-26 absl-team Revert integer-to-string conversion optimizations pending more thorough analysis
2024-03-26 qrczak Fix a bug in `Cord::{Append,Prepend}(CordBuffer)`: call `MaybeRemoveEmptyCrcNode()`. Otherwise appending a `CordBuffer` an empty Cord with a CRC node crashes (`RemoveCrcNode()` which increases the refcount of a nullptr child).
2024-03-25 goldvitaly Add `BM_EraseIf` benchmark.
2024-03-25 ckennelly Record sizeof(key_type), sizeof(value_type) in hashtable profiles.
2024-03-25 ezb Fix ClangTidy warnings in btree.h.
2024-03-24 absl-team LSC: Move expensive variables on their last use to avoid copies.
2024-03-22 aurelien PR #1644: unscaledcycleclock: remove RISC-V support
2024-03-22 pbos Reland: Make DLOG(FATAL) not understood as [[noreturn]]
2024-03-21 absl-team Separate out absl::StatusOr constraints into statusor_internal.h
2024-03-21 ezb Use Layout::WithStaticSizes in btree.
2024-03-21 dinor `layout`: Delete outdated comments about ElementType alias not being used because of MSVC
2024-03-20 absl-team Performance improvement for absl::AsciiStrToUpper() and absl::AsciiStrToLower()
2024-03-20 dinor `layout_benchmark`: Replace leftover comment with intended call to MyAlign
2024-03-19 dmauro Remove absl::aligned_storage_t
2024-03-19 absl-team Delete ABSL_ANNOTATE_MEMORY_IS_INITIALIZED under Thread Sanitizer
2024-03-19 dmauro Remove vestigial variables in the DumpNode() helper in absl::Cord
2024-03-19 ezb Do hashtablez sampling on the first insertion into an empty SOO hashtable.
2024-03-19 absl-team Add explicit #include directives for <tuple>, "absl/base/config.h", and "absl/strings/string_view.h".
2024-03-19 absl-team Add a note about the cost of `VLOG` in non-debug builds.
2024-03-18 ezb Fix flaky test failures on MSVC.
2024-03-18 ezb Add template keyword to example comment for Layout::WithStaticSizes.
2024-03-18 hannahshisfb PR #1643: add xcprivacy to all subspecs
2024-03-18 ckennelly Record sampling stride in cord profiling to facilitate unsampling.
2024-03-18 ezb Fix a typo in a comment.
2024-03-18 absl-team [log] Correct SetVLOGLevel to SetVLogLevel in comments
2024-03-18 absl-team Add a feature to container_internal::Layout that lets you specify some array sizes at compile-time as template parameters. This can make offset and size calculations faster.
2024-03-15 dinor `layout`: Mark parameter of Slices with ABSL_ATTRIBUTE_UNUSED, remove old workaround
2024-03-15 dinor `layout`: Use auto return type for functions that explicitly instantiate std::tuple in return statements
2024-03-15 absl-team Remove redundant semicolons introduced by macros
2024-03-15 absl-team [log] Make :vlog_is_on/:absl_vlog_is_on public in BUILD.bazel
2024-03-14 dmauro Add additional checks for size_t overflows
2024-03-14 absl-team Replace //visibility:private with :__pkg__ for certain targets
2024-03-13 80600850+adgajda PR #1603: Disable -Wnon-virtual-dtor warning for CommandLineFlag implementations
2024-03-13 absl-team Add several missing includes in crc/internal
2024-03-13 ezb Roll back extern template instatiations in swisstable due to binary size increases in shared libraries.
2024-03-13 ckennelly Add nodiscard to SpinLockHolder.
2024-03-13 goldvitaly Test that rehash(0) reduces capacity to minimum.
2024-03-12 ezb Add extern templates for common swisstable types.
2024-03-12 absl-team Disable ubsan for benign unaligned access in crc_memcpy
2024-03-12 ezb Make swisstable SOO support GDB pretty printing and still compile in OSS.
2024-03-12 absl-team Fix OSX support with CocoaPods and Xcode 15
2024-03-12 dmauro Fix GCC7 C++17 build
2024-03-12 absl-team Use UnixEpoch and ZeroDuration
2024-03-12 ezb Make flaky failures much less likely in BasicMocking.MocksNotTriggeredForIncorrectTypes test.
2024-03-12 absl-team Delete a stray comment
2024-03-11 ezb Move GCC uninitialized memory warning suppression into MaybeInitializedPtr.
2024-03-11 dmauro Replace usages of absl::move, absl::forward, and absl::exchange with their std:: equivalents
2024-03-11 absl-team Fix the move to itself
2024-03-07 absl-team Work around an implicit conversion signedness compiler warning
2024-03-07 ezb Avoid MSan: use-of-uninitialized-value error in find_non_soo.

Created with:
  roll-dep third_party/abseil/src

Bug: 388068052
Change-Id: I0cb512d39490723efe6809dc5aeb74029b68ac91
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/6216862
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Muyao Xu <muyaoxu@google.com>
4 files changed
tree: 1bf3acbac0bc7dae8df63cd9a92265e11e198ab9
  1. build_overrides/
  2. cast/
  3. discovery/
  4. docs/
  5. gni/
  6. infra/
  7. osp/
  8. platform/
  9. test/
  10. testing/
  11. third_party/
  12. tools/
  13. util/
  14. .clang-format
  15. .gitignore
  16. .gitmodules
  17. .gn
  18. .vpython3
  19. AUTHORS
  20. BUILD.gn
  21. codereview.settings
  22. COMMITTERS
  23. DEPS
  24. LICENSE
  25. PRESUBMIT.py
  26. PRESUBMIT_test_mocks.py
  27. README.md
README.md

Open Screen Library

The Open Screen Library implements the Open Screen Protocol, Multicast DNS and DNS-SD, and the Chromecast protocols (discovery, application control, and media streaming).

The library consists of feature modules that share a common platform API that must be implemented and linked by the embedding application.

The major feature modules in the library can be used independently and have their own documentation:

Getting the code

Installing depot_tools

Library dependencies are managed using gclient, from the depot_tools repo.

To get gclient, run the following command in your terminal:

    git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Then add the depot_tools folder to your PATH environment variable.

Note that openscreen does not use other features of depot_tools like repo or drover. However, some git-cl functions do work, like git cl try, git cl format, git cl lint, and git cl upload.

Checking out code

From the parent directory of where you want the openscreen checkout (e.g., ~/my_project_dir), configure gclient and check out openscreen with the following commands:

    cd ~/my_project_dir
    gclient config https://chromium.googlesource.com/openscreen
    gclient sync

The first gclient command will create a default .gclient file in ~/my_project_dir that describes how to pull down the openscreen repository. The second command creates an openscreen/ subdirectory, downloads the source code, all third-party dependencies, and the toolchain needed to build things; and at their appropriate revisions.

Syncing your local checkout

To update your local checkout from the openscreen reference repository, just run

   cd ~/my_project_dir/openscreen
   git pull
   gclient sync

This will rebase any local commits on the remote top-of-tree, and update any dependencies that have changed.

Build setup

The following are the main tools are required for development/builds.

  • Installed by gclient automatically
    • Build file generator: gn (installed into buildtools/)
    • Code formatter: clang-format (installed into buildtools/)
    • Builder: ninja
    • Compiler/Linker: clang
  • Installed by you
    • JSON validator: yajsv
    • libstdc++
    • gcc
    • XCode

yajsv installation

  1. Install go from https://golang.org or your Linux package manager.
  2. go install github.com/neilpa/yajsv@latest

libstdc++ (Linux only)

Ensure that libstdc++ 8 is installed, as clang depends on the system instance of it. On Debian flavors, you can run:

   sudo apt-get install libstdc++-8-dev libstdc++6-8-dbg

XCode (Mac only)

You can install the XCode command-line tools only or the full version of XCode.

xcode-select --install

gcc (optional, Linux only)

Setting the gn argument is_clang=false on Linux enables building using gcc instead.

  mkdir out/debug-gcc
  gn gen out/debug-gcc --args="is_clang=false"

Note that g++ version 9 or newer must be installed. On Debian flavors you can run:

  sudo apt-get install gcc-9

Debug build

Setting the gn argument is_debug=true enables debug build.

  gn gen out/debug --args="is_debug=true"

gn configuration

Running gn args opens an editor that allows to create a list of arguments passed to every invocation of gn gen. gn args --list will list all of the possible arguments you can set.

  gn args out/debug

Building targets

We use the Open Screen Protocol demo application as an example, however, the instructions are essentially the same for all executable targets.

  mkdir out/debug
  gn gen out/debug             # Creates the build directory and necessary ninja files
  ninja -C out/debug osp_demo  # Builds the executable with ninja
  ./out/debug/osp_demo         # Runs the executable

The -C argument to ninja works just like it does for GNU Make: it specifies the working directory for the build. So the same could be done as follows:

  ./gn gen out/debug
  cd out/debug
  ninja osp_demo
  ./osp_demo

After editing a file, only ninja needs to be rerun, not gn. If you have edited a BUILD.gn file, ninja will re-run gn for you.

We recommend using autoninja instead of ninja, which takes the same command-line arguments but automatically parallelizes the build for your system, depending on number of processor cores, amount of RAM, etc.

Also, while specifying build targets is possible while using ninja, typically for development it is sufficient to just build everything, especially since the Open Screen repository is still quite small. That makes the invocation to the build system simplify to:

  autoninja -C out/debug

For details on running osp_demo, see its README.md.

Building all targets

Running ninja -C out/debug gn_all will build all non-test targets in the repository.

gn ls --type=executable out/debug will list all of the executable targets that can be built.

If you want to customize the build further, you can run gn args out/debug to pull up an editor for build flags. gn args --list out/debug prints all of the build flags available.

Building and running unit tests

  ninja -C out/debug openscreen_unittests
  ./out/debug/openscreen_unittests

Contributing changes

Open Screen library code should follow the Open Screen Library Style Guide.

This library uses Chromium Gerrit for patch management and code review (for better or worse). You will need to register for an account at chromium-review.googlesource.com to upload patches for review.

The following sections contain some tips about dealing with Gerrit for code reviews, specifically when pushing patches for review, getting patches reviewed, and committing patches.

Uploading a patch for review

The git cl tool handles details of interacting with Gerrit (the Chromium code review tool) and is recommended for pushing patches for review. Once you have committed changes locally, simply run:

  git cl format
  git cl upload

The first command will will auto-format the code changes using clang-format. Then, the second command runs the PRESUBMIT.py script to check style and, if it passes, a newcode review will be posted on chromium-review.googlesource.com.

If you make additional commits to your local branch, then running git cl upload again in the same branch will merge those commits into the ongoing review as a new patchset.

It's simplest to create a local git branch for each patch you want reviewed separately. git cl keeps track of review status separately for each local branch.

Addressing merge conflicts

If conflicting commits have been landed in the repository for a patch in review, Gerrit will flag the patch as having a merge conflict. In that case, use the instructions above to rebase your commits on top-of-tree and upload a new patchset with the merge conflicts resolved.

Tryjobs

Clicking the CQ DRY RUN button (also, confusingly, labeled COMMIT QUEUE +1) will run the current patchset through all LUCI builders and report the results. It is always a good idea get a green tryjob on a patch before sending it for review to avoid extra back-and-forth.

You can also run git cl try from the commandline to submit a tryjob.

Code reviews

Send your patch to one or more committers in the COMMITTERS file for code review. All patches must receive at least one LGTM by a committer before it can be submitted.

Submitting patches

After your patch has received one or more LGTM commit it by clicking the SUBMIT button (or, confusingly, COMMIT QUEUE +2) in Gerrit. This will run your patch through the builders again before committing to the main openscreen repository.

Additional resources