-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
absl doesn't provide an AAR, and the AGP DSL for creating one can't describe the package correctly (it can't seem to find the libraries at all, and even if it could, it can't describe a single header directory shared by multiple libraries). Without that support, the only remaining option is to vendor it into the tree and include it directly in any CMake project that uses it. The downside of doing it this was is that absl will be rebuilt for every module rather than shared among them. An alternative would be importing android-base for AOSP, but that's a rather large porting task. Another alternative would be doing none of this and writing our own, much simpler subsets of those libraries. Mostly we want `CHECK`, `LOG`, and `DISALLOW_COPY_AND_ASSIGN`. libbase's logging.cpp has quite a few dependencies on other parts of libbase (file, parseint, strings, threads) and it quickly becomes a large project to import, but maybe those are only needed by APIs we don't actually care about.
- Loading branch information
Showing
1,523 changed files
with
276,788 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# CMake modules | ||
|
||
This directory contains CMake modules used by the samples. They can be imported | ||
in any sample with `include(<NAME>)`, where `<NAME>` is the name of the module | ||
file without the extension. For example, `include(absl)` will include absl in | ||
the build and make those libraries available to the sample. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include_guard() | ||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/absl ${CMAKE_CURRENT_BINARY_DIR}/absl) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DisableFormat: true | ||
SortIncludes: never |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# third_party | ||
|
||
This directory contains third-party code used by the samples. Currently this | ||
directory contains only absl, which provides things like `LOG(ERROR)` and | ||
`CHECK()`. | ||
|
||
Note that absl does **not** have a stable ABI at the time of writing. As such, | ||
if you are a middleware developer who distributes native libraries in binary | ||
form (whether `.so` or `.a`), you probably cannot use absl. See [Advice for | ||
middleware vendors] for more details. | ||
|
||
[Advice for middleware vendors]: | ||
https://developer.android.com/ndk/guides/middleware-vendors |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
... |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Bug Report | ||
description: Let us know that something does not work as expected. | ||
title: "[Bug]: Please title this bug report" | ||
body: | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: Describe the issue | ||
description: What happened, and what did you expect to happen? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: Steps to reproduce the problem | ||
description: It is important that we are able to reproduce the problem that you are experiencing. Please provide all code and relevant steps to reproduce the problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the problem are also helpful. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: version | ||
attributes: | ||
label: What version of Abseil are you using? | ||
description: Please include the output of `git rev-parse HEAD` or the name of the LTS release that you are using. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: os | ||
attributes: | ||
label: What operating system and version are you using? | ||
description: If you are using a Linux distribution please include the name and version of the distribution as well. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: compiler | ||
attributes: | ||
label: What compiler and version are you using? | ||
description: Please include the output of `gcc -v` or `clang -v`, or the equivalent for your compiler. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: buildsystem | ||
attributes: | ||
label: What build system are you using? | ||
description: Please include the output of `bazel --version` or `cmake --version`, or the equivalent for your build system. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional context | ||
description: Add any other context about the problem here. | ||
validations: | ||
required: false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Question | ||
url: https://github.com/abseil/abseil-cpp/discussions | ||
about: Have a question? Ask us anything! :-) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Thank you for your contribution to Abseil! | ||
|
||
Before submitting this PR, please be sure to read our [contributing | ||
guidelines](https://github.com/abseil/abseil-cpp/blob/master/CONTRIBUTING.md). | ||
|
||
If you are a Googler, please also note that it is required that you send us a | ||
Piper CL instead of using the GitHub pull-request process. The code propagation | ||
process will deliver the change to GitHub. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Bzlmod lockfile | ||
MODULE.bazel.lock | ||
# Ignore all bazel-* symlinks. | ||
/bazel-* | ||
# Ignore Bazel verbose explanations | ||
--verbose_explanations | ||
# Ignore CMake usual build directory | ||
build | ||
# Ignore Vim files | ||
*.swp | ||
# Ignore QtCreator Project file | ||
CMakeLists.txt.user | ||
# Ignore VS Code files | ||
.vscode/* | ||
# Ignore generated python artifacts | ||
*.pyc | ||
copts/__pycache__/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Please submit a new Abseil Issue using the template below: | ||
|
||
## [Short title of proposed API change(s)] | ||
|
||
-------------------------------------------------------------------------------- | ||
-------------------------------------------------------------------------------- | ||
|
||
## Background | ||
|
||
[Provide the background information that is required in order to evaluate the | ||
proposed API changes. No controversial claims should be made here. If there are | ||
design constraints that need to be considered, they should be presented here | ||
**along with justification for those constraints**. Linking to other docs is | ||
good, but please keep the **pertinent information as self contained** as | ||
possible in this section.] | ||
|
||
## Proposed API Change (s) | ||
|
||
[Please clearly describe the API change(s) being proposed. If multiple changes, | ||
please keep them clearly distinguished. When possible, **use example code | ||
snippets to illustrate before-after API usages**. List pros-n-cons. Highlight | ||
the main questions that you want to be answered. Given the Abseil project compatibility requirements, describe why the API change is safe.] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This is the list of Abseil authors for copyright purposes. | ||
# | ||
# This does not necessarily list everyone who has contributed code, since in | ||
# some cases, their employer may be the copyright holder. To see the full list | ||
# of contributors, see the revision history in source control. | ||
Google Inc. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright 2020 The Abseil Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
# Expose license for external usage through bazel. | ||
exports_files([ | ||
"AUTHORS", | ||
"LICENSE", | ||
]) |
Oops, something went wrong.