Skip to content

Commit b56cbdd

Browse files
Abseil Teamderekmauro
authored andcommitted
Abseil LTS 20200923
What's New: * `absl::StatusOr<T>` has been released. See our [blog post](https://abseil.io/blog/2020-091021-status) for more information. * Abseil Flags reflection interfaces have been released. * Abseil Flags memory usage has been significantly optimized. * Abseil now supports a "hardened" build mode. This build mode enables runtime checks that guard against programming errors that may lead to security vulnerabilities. Notable Fixes: * Sanitizer dynamic annotations like `AnnotateRWLockCreate` that are also defined by the compiler sanitizer implementation are no longer also defined by Abseil. * Sanitizer macros are now prefixed with `ABSL_` to avoid naming collisions. * Sanitizer usage is now automatically detected and no longer requires macros like `ADDRESS_SANITIZER` to be defined on the command line. Breaking Changes: * Abseil no longer contains a `dynamic_annotations` library. Users using a supported build system (Bazel or CMake) are unaffected by this, but users manually specifying link libraries may get an error about a missing linker input. Baseline: 7680a5f Cherry picks: None
1 parent b832dce commit b56cbdd

File tree

388 files changed

+21421
-7815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+21421
-7815
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
11+
Include a clear and concise description of what the problem is, including what
12+
you expected to happen, and what actually happened.
13+
14+
**Steps to reproduce the bug**
15+
16+
It's important that we are able to reproduce the problem that you are
17+
experiencing. Please provide all code and relevant steps to reproduce the
18+
problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links
19+
to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the
20+
problem are also helpful.
21+
22+
**What version of Abseil are you using?**
23+
24+
**What operating system and version are you using**
25+
26+
If you are using a Linux distribution please include the name and version of the
27+
distribution as well.
28+
29+
**What compiler and version are you using?**
30+
31+
Please include the output of `gcc -v` or `clang -v`, or the equivalent for your
32+
compiler.
33+
34+
**What build system are you using?**
35+
36+
Please include the output of `bazel --version` or `cmake --version`, or the
37+
equivalent for your build system.
38+
39+
**Additional context**
40+
41+
Add any other context about the problem here.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Question
3+
about: Have a question? Ask us anything! :-)
4+
title: ''
5+
labels: 'question'
6+
assignees: ''
7+
---

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enables: true

BUILD.bazel

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright 2020 The Abseil Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
package(default_visibility = ["//visibility:public"])
18+
19+
licenses(["notice"]) # Apache 2.0
20+
21+
# Expose license for external usage through bazel.
22+
exports_files([
23+
"AUTHORS",
24+
"LICENSE",
25+
])

CMake/AbseilDll.cmake

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ set(ABSL_INTERNAL_DLL_FILES
88
"base/casts.h"
99
"base/config.h"
1010
"base/const_init.h"
11-
"base/dynamic_annotations.cc"
1211
"base/dynamic_annotations.h"
1312
"base/internal/atomic_hook.h"
1413
"base/internal/bits.h"
1514
"base/internal/cycleclock.cc"
1615
"base/internal/cycleclock.h"
1716
"base/internal/direct_mmap.h"
17+
"base/internal/dynamic_annotations.h"
1818
"base/internal/endian.h"
1919
"base/internal/errno_saver.h"
2020
"base/internal/exponential_biased.cc"
2121
"base/internal/exponential_biased.h"
22+
"base/internal/fast_type_id.h"
2223
"base/internal/hide_ptr.h"
2324
"base/internal/identity.h"
2425
"base/internal/invoke.h"
@@ -35,6 +36,8 @@ set(ABSL_INTERNAL_DLL_FILES
3536
"base/internal/scheduling_mode.h"
3637
"base/internal/scoped_set_env.cc"
3738
"base/internal/scoped_set_env.h"
39+
"base/internal/strerror.h"
40+
"base/internal/strerror.cc"
3841
"base/internal/spinlock.cc"
3942
"base/internal/spinlock.h"
4043
"base/internal/spinlock_wait.cc"
@@ -128,18 +131,16 @@ set(ABSL_INTERNAL_DLL_FILES
128131
"random/bit_gen_ref.h"
129132
"random/discrete_distribution.cc"
130133
"random/discrete_distribution.h"
131-
"random/distribution_format_traits.h"
132134
"random/distributions.h"
133135
"random/exponential_distribution.h"
134136
"random/gaussian_distribution.cc"
135137
"random/gaussian_distribution.h"
136-
"random/internal/distributions.h"
137138
"random/internal/distribution_caller.h"
138-
"random/internal/fast_uniform_bits.h"
139139
"random/internal/fastmath.h"
140-
"random/internal/gaussian_distribution_gentables.cc"
140+
"random/internal/fast_uniform_bits.h"
141141
"random/internal/generate_real.h"
142142
"random/internal/iostream_state_saver.h"
143+
"random/internal/mock_helpers.h"
143144
"random/internal/nonsecure_base.h"
144145
"random/internal/pcg_engine.h"
145146
"random/internal/platform.h"
@@ -152,6 +153,7 @@ set(ABSL_INTERNAL_DLL_FILES
152153
"random/internal/randen_engine.h"
153154
"random/internal/randen_hwaes.cc"
154155
"random/internal/randen_hwaes.h"
156+
"random/internal/randen_round_keys.cc"
155157
"random/internal/randen_slow.cc"
156158
"random/internal/randen_slow.h"
157159
"random/internal/randen_traits.h"
@@ -172,8 +174,12 @@ set(ABSL_INTERNAL_DLL_FILES
172174
"random/uniform_int_distribution.h"
173175
"random/uniform_real_distribution.h"
174176
"random/zipf_distribution.h"
177+
"status/internal/status_internal.h"
178+
"status/internal/statusor_internal.h"
175179
"status/status.h"
176180
"status/status.cc"
181+
"status/statusor.h"
182+
"status/statusor.cc"
177183
"status/status_payload_printer.h"
178184
"status/status_payload_printer.cc"
179185
"strings/ascii.cc"
@@ -292,6 +298,8 @@ set(ABSL_INTERNAL_DLL_FILES
292298
"types/internal/conformance_aliases.h"
293299
"types/internal/conformance_archetype.h"
294300
"types/internal/conformance_profile.h"
301+
"types/internal/parentheses.h"
302+
"types/internal/transform_args.h"
295303
"types/internal/variant.h"
296304
"types/optional.h"
297305
"types/internal/optional.h"

CMake/AbseilHelpers.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ include(AbseilInstallDirs)
2323
# project that sets
2424
# set_property(GLOBAL PROPERTY USE_FOLDERS ON)
2525
# For example, Visual Studio supports folders.
26-
set(ABSL_IDE_FOLDER Abseil)
26+
if(NOT DEFINED ABSL_IDE_FOLDER)
27+
set(ABSL_IDE_FOLDER Abseil)
28+
endif()
2729

2830
# absl_cc_library()
2931
#

CMake/AbseilInstallDirs.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ if(absl_VERSION)
1010
set(ABSL_SUBDIR "${PROJECT_NAME}_${PROJECT_VERSION}")
1111
set(ABSL_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}/${ABSL_SUBDIR}")
1212
set(ABSL_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${ABSL_SUBDIR}")
13-
set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/{ABSL_SUBDIR}")
13+
set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/${ABSL_SUBDIR}")
1414
set(ABSL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${ABSL_SUBDIR}")
1515
else()
1616
set(ABSL_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}")
1717
set(ABSL_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
1818
set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
1919
set(ABSL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
20-
endif()
20+
endif()

CMake/Googletest/CMakeLists.txt.in

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
cmake_minimum_required(VERSION 2.8.2)
22

3-
project(googletest-download NONE)
3+
project(googletest-external NONE)
44

55
include(ExternalProject)
6-
ExternalProject_Add(googletest
7-
GIT_REPOSITORY https://github.com/google/googletest.git
8-
GIT_TAG master
9-
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
10-
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
11-
CONFIGURE_COMMAND ""
12-
BUILD_COMMAND ""
13-
INSTALL_COMMAND ""
14-
TEST_COMMAND ""
15-
)
6+
if(${ABSL_USE_GOOGLETEST_HEAD})
7+
ExternalProject_Add(googletest
8+
GIT_REPOSITORY https://github.com/google/googletest.git
9+
GIT_TAG master
10+
SOURCE_DIR "${absl_gtest_src_dir}"
11+
BINARY_DIR "${absl_gtest_build_dir}"
12+
CONFIGURE_COMMAND ""
13+
BUILD_COMMAND ""
14+
INSTALL_COMMAND ""
15+
TEST_COMMAND ""
16+
)
17+
else()
18+
ExternalProject_Add(googletest
19+
SOURCE_DIR "${absl_gtest_src_dir}"
20+
BINARY_DIR "${absl_gtest_build_dir}"
21+
CONFIGURE_COMMAND ""
22+
BUILD_COMMAND ""
23+
INSTALL_COMMAND ""
24+
TEST_COMMAND ""
25+
)
26+
endif()
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# Downloads and unpacks googletest at configure time. Based on the instructions
2-
# at https://github.com/google/googletest/tree/master/googletest#incorporating-into-an-existing-cmake-project
1+
# Integrates googletest at configure time. Based on the instructions at
2+
# https://github.com/google/googletest/tree/master/googletest#incorporating-into-an-existing-cmake-project
33

4-
# Download the latest googletest from Github master
4+
# Set up the external googletest project, downloading the latest from Github
5+
# master if requested.
56
configure_file(
67
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in
7-
${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt
8+
${CMAKE_BINARY_DIR}/googletest-external/CMakeLists.txt
89
)
910

1011
set(ABSL_SAVE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
@@ -14,17 +15,17 @@ if (BUILD_SHARED_LIBS)
1415
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_CREATE_SHARED_LIBRARY=1")
1516
endif()
1617

17-
# Configure and build the downloaded googletest source
18+
# Configure and build the googletest source.
1819
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
1920
RESULT_VARIABLE result
20-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download )
21+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-external )
2122
if(result)
2223
message(FATAL_ERROR "CMake step for googletest failed: ${result}")
2324
endif()
2425

2526
execute_process(COMMAND ${CMAKE_COMMAND} --build .
2627
RESULT_VARIABLE result
27-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download)
28+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-external)
2829
if(result)
2930
message(FATAL_ERROR "Build step for googletest failed: ${result}")
3031
endif()
@@ -37,6 +38,4 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
3738

3839
# Add googletest directly to our build. This defines the gtest and gtest_main
3940
# targets.
40-
add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
41-
${CMAKE_BINARY_DIR}/googletest-build
42-
EXCLUDE_FROM_ALL)
41+
add_subdirectory(${absl_gtest_src_dir} ${absl_gtest_build_dir} EXCLUDE_FROM_ALL)

CMake/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ absl::flags
9393
absl::memory
9494
absl::meta
9595
absl::numeric
96-
absl::random
96+
absl::random_random
9797
absl::strings
9898
absl::synchronization
9999
absl::time

0 commit comments

Comments
 (0)