Export of internal Abseil changes.
-- f6c627ce4470a814adc377947b58346eef69a4c9 by Jon Cohen <cohenjon@google.com>: Don't create install rules when Abseil is used as a subdirectory. Fix #287 PiperOrigin-RevId: 240559825 -- a5d9b06fe736143068997988b654b5f66ec3266a by Matt Calabrese <calabrese@google.com>: Make absl::nullopt an inline constexpr variable, as specified in the standard (with a workaround for pre-c++17 compilers). PiperOrigin-RevId: 240552286 -- d7bee50cff745fbb8d1cdf56a200d9073d311c80 by Abseil Team <absl-team@google.com>: Internal Change PiperOrigin-RevId: 240425622 -- 828dd49d392d83dbeecd9d3e9cb14551ab265905 by Jon Cohen <cohenjon@google.com>: Add default link options to absl builds. Currently all this does is add -ignore:4221 to Abseil msvc builds, but the structure is all in place to add more link options when necessary Fix #277 Note: This CL changes tact for us in that it puts the default options in the helper function as opposed to the invocations of absl_cc_blah. The original intent of keeping these out of the helper functions was to make generating the CMakeLists.txt files have a smaller diff, but looking now that is a problem for the future, and small compared to making maintenance and use of our CMake buildsystem easier PiperOrigin-RevId: 240409463 -- 4aa120e9dcf76d29e9ca0008d0f6d4d9fa8abe8c by Matt Kulukundis <kfm@google.com>: Reduce flake rate for non-determistic test to < 1/10,000 PiperOrigin-RevId: 240370938 -- bc30e219531827bfbf90915b2067c7fb8160bb6d by Derek Mauro <dmauro@google.com>: Add Bazel caching on Kokoro for new linux targets. PiperOrigin-RevId: 240356556 -- c4e06d79a50d7bb211312b7845c4bd92c0761747 by Jon Cohen <cohenjon@google.com>: include AbseilInstallDirs instead of GNUInstallDirs. It worked before because global_CMakeLists.txt also included AbseilInstallDirs PiperOrigin-RevId: 240206409 -- c254dc6cade8a263f3f97fb1417d92fe5235ff32 by Jon Cohen <cohenjon@google.com>: Fix logic for when we create the variant_exception_safety_test in CMake. Currently we are only running in on gcc > 4.9, when we want it run on every compiler except gcc <= 4.8 PiperOrigin-RevId: 240194174 -- 01518006b351d3670ba1d349cfbcb7dd6f3a8b84 by CJ Johnson <johnsoncj@google.com>: Removes old implementation warning comment now that InlinedVector has an implementation detail file PiperOrigin-RevId: 240167265 -- eb05355ae8c7397752ab7a65afc9e0a99472ba9d by Jon Cohen <cohenjon@google.com>: Remove the forward declaration of Span PiperOrigin-RevId: 240156660 -- b7e75aa3933d6e79dd086821cf58d15e72f476f4 by Jon Cohen <cohenjon@google.com>: Prepare CMake install rule for LTS releases: * Remove the warning against installing in system install locations * Insert versioning to keep different LTS installs from colliding. Headers are installed in <prefix>/absl_$version/include, .a files in <prefix>/absl_$version/lib, and config files in <prefix>/absl_$version/lib/cmake PiperOrigin-RevId: 240153986 -- de63488ab6236e041f08260794b0b634a2b8ed16 by CJ Johnson <johnsoncj@google.com>: Reduce reader confusion by using std::addressof(...) even when the type is known to not overload operator&(...) PiperOrigin-RevId: 240131902 GitOrigin-RevId: f6c627ce4470a814adc377947b58346eef69a4c9 Change-Id: I95dbbacaaf65aceeeca9e9bee5fd9ea456225f62
This commit is contained in:
parent
eab2078b53
commit
5b65c4af51
33 changed files with 493 additions and 233 deletions
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
include(CMakeParseArguments)
|
include(CMakeParseArguments)
|
||||||
include(AbseilConfigureCopts)
|
include(AbseilConfigureCopts)
|
||||||
include(GNUInstallDirs)
|
include(AbseilInstallDirs)
|
||||||
|
|
||||||
# The IDE folder for Abseil that will be used if Abseil is included in a CMake
|
# The IDE folder for Abseil that will be used if Abseil is included in a CMake
|
||||||
# project that sets
|
# project that sets
|
||||||
|
@ -105,13 +105,15 @@ function(absl_cc_library)
|
||||||
target_include_directories(${_NAME}
|
target_include_directories(${_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${ABSL_COMMON_INCLUDE_DIRS}>
|
$<BUILD_INTERFACE:${ABSL_COMMON_INCLUDE_DIRS}>
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
$<INSTALL_INTERFACE:${ABSL_INSTALL_INCLUDEDIR}>
|
||||||
)
|
)
|
||||||
target_compile_options(${_NAME}
|
target_compile_options(${_NAME}
|
||||||
PRIVATE ${ABSL_CC_LIB_COPTS})
|
PRIVATE ${ABSL_CC_LIB_COPTS})
|
||||||
target_link_libraries(${_NAME}
|
target_link_libraries(${_NAME}
|
||||||
PUBLIC ${ABSL_CC_LIB_DEPS}
|
PUBLIC ${ABSL_CC_LIB_DEPS}
|
||||||
PRIVATE ${ABSL_CC_LIB_LINKOPTS}
|
PRIVATE
|
||||||
|
${ABSL_CC_LIB_LINKOPTS}
|
||||||
|
${ABSL_DEFAULT_LINKOPTS}
|
||||||
)
|
)
|
||||||
target_compile_definitions(${_NAME} PUBLIC ${ABSL_CC_LIB_DEFINES})
|
target_compile_definitions(${_NAME} PUBLIC ${ABSL_CC_LIB_DEFINES})
|
||||||
|
|
||||||
|
@ -140,10 +142,13 @@ function(absl_cc_library)
|
||||||
target_include_directories(${_NAME}
|
target_include_directories(${_NAME}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<BUILD_INTERFACE:${ABSL_COMMON_INCLUDE_DIRS}>
|
$<BUILD_INTERFACE:${ABSL_COMMON_INCLUDE_DIRS}>
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
$<INSTALL_INTERFACE:${ABSL_INSTALL_INCLUDEDIR}>
|
||||||
)
|
)
|
||||||
target_link_libraries(${_NAME}
|
target_link_libraries(${_NAME}
|
||||||
INTERFACE ${ABSL_CC_LIB_DEPS} ${ABSL_CC_LIB_LINKOPTS}
|
INTERFACE
|
||||||
|
${ABSL_CC_LIB_DEPS}
|
||||||
|
${ABSL_CC_LIB_LINKOPTS}
|
||||||
|
${ABSL_DEFAULT_LINKOPTS}
|
||||||
)
|
)
|
||||||
target_compile_definitions(${_NAME} INTERFACE ${ABSL_CC_LIB_DEFINES})
|
target_compile_definitions(${_NAME} INTERFACE ${ABSL_CC_LIB_DEFINES})
|
||||||
endif()
|
endif()
|
||||||
|
@ -152,9 +157,9 @@ function(absl_cc_library)
|
||||||
# installed abseil can't be tested.
|
# installed abseil can't be tested.
|
||||||
if (NOT ABSL_CC_LIB_TESTONLY)
|
if (NOT ABSL_CC_LIB_TESTONLY)
|
||||||
install(TARGETS ${_NAME} EXPORT ${PROJECT_NAME}Targets
|
install(TARGETS ${_NAME} EXPORT ${PROJECT_NAME}Targets
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${ABSL_INSTALL_BINDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${ABSL_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${ABSL_INSTALL_LIBDIR}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
20
CMake/AbseilInstallDirs.cmake
Normal file
20
CMake/AbseilInstallDirs.cmake
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
# absl_VERSION is only set if we are an LTS release being installed, in which
|
||||||
|
# case it may be into a system directory and so we need to make subdirectories
|
||||||
|
# for each installed version of Abseil. This mechanism is implemented in
|
||||||
|
# Abseil's internal Copybara (https://github.com/google/copybara) workflows and
|
||||||
|
# isn't visible in the CMake buildsystem itself.
|
||||||
|
|
||||||
|
if (absl_VERSION)
|
||||||
|
set(ABSL_SUBDIR "${PROJECT_NAME}_${PROJECT_VERSION}")
|
||||||
|
set(ABSL_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}/${ABSL_SUBDIR}")
|
||||||
|
set(ABSL_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${ABSL_SUBDIR}")
|
||||||
|
set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/{ABSL_SUBDIR}")
|
||||||
|
set(ABSL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${ABSL_SUBDIR}")
|
||||||
|
else()
|
||||||
|
set(ABSL_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}")
|
||||||
|
set(ABSL_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
||||||
|
set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
|
set(ABSL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
endif()
|
|
@ -24,15 +24,6 @@
|
||||||
|
|
||||||
# Fail on any error. Treat unset variables an error. Print commands as executed.
|
# Fail on any error. Treat unset variables an error. Print commands as executed.
|
||||||
set -euox pipefail
|
set -euox pipefail
|
||||||
absl_dir=/abseil-cpp
|
|
||||||
absl_build_dir=/buildfs/absl-build
|
|
||||||
project_dir="${absl_dir}"/CMake/install_test_project
|
|
||||||
project_build_dir=/buildfs/project-build
|
|
||||||
install_dir="${project_build_dir}"/install
|
|
||||||
|
|
||||||
mkdir -p "${absl_build_dir}"
|
|
||||||
mkdir -p "${project_build_dir}"
|
|
||||||
mkdir -p "${install_dir}"
|
|
||||||
|
|
||||||
install_absl() {
|
install_absl() {
|
||||||
pushd "${absl_build_dir}"
|
pushd "${absl_build_dir}"
|
||||||
|
@ -51,10 +42,41 @@ uninstall_absl() {
|
||||||
mkdir -p "${absl_build_dir}"
|
mkdir -p "${absl_build_dir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lts_install=""
|
||||||
|
|
||||||
|
while getopts ":l" lts; do
|
||||||
|
case "${lts}" in
|
||||||
|
l )
|
||||||
|
lts_install="true"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
absl_dir=/abseil-cpp
|
||||||
|
absl_build_dir=/buildfs/absl-build
|
||||||
|
project_dir="${absl_dir}"/CMake/install_test_project
|
||||||
|
project_build_dir=/buildfs/project-build
|
||||||
|
|
||||||
|
mkdir -p "${absl_build_dir}"
|
||||||
|
mkdir -p "${project_build_dir}"
|
||||||
|
|
||||||
|
if [[ "${lts_install}" ]]; then
|
||||||
|
install_dir="/usr/local"
|
||||||
|
else
|
||||||
|
install_dir="${project_build_dir}"/install
|
||||||
|
fi
|
||||||
|
mkdir -p "${install_dir}"
|
||||||
|
|
||||||
# Test build, install, and link against installed abseil
|
# Test build, install, and link against installed abseil
|
||||||
install_absl "${install_dir}"
|
|
||||||
pushd "${project_build_dir}"
|
pushd "${project_build_dir}"
|
||||||
|
if [[ "${lts_install}" ]]; then
|
||||||
|
install_absl
|
||||||
|
cmake "${project_dir}"
|
||||||
|
else
|
||||||
|
install_absl "${install_dir}"
|
||||||
cmake "${project_dir}" -DCMAKE_PREFIX_PATH="${install_dir}"
|
cmake "${project_dir}" -DCMAKE_PREFIX_PATH="${install_dir}"
|
||||||
|
fi
|
||||||
|
|
||||||
cmake --build . --target simple
|
cmake --build . --target simple
|
||||||
|
|
||||||
output="$(${project_build_dir}/simple "printme" 2>&1)"
|
output="$(${project_build_dir}/simple "printme" 2>&1)"
|
||||||
|
@ -64,14 +86,16 @@ if [[ "${output}" != *"Arg 1: printme"* ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
# Test that we haven't accidentally made absl::abslblah
|
# Test that we haven't accidentally made absl::abslblah
|
||||||
pushd "${install_dir}"
|
pushd "${install_dir}"
|
||||||
|
|
||||||
# Starting in CMake 3.12 the default install dir is lib$bit_width
|
# Starting in CMake 3.12 the default install dir is lib$bit_width
|
||||||
if [[ -d lib ]]; then
|
if [[ -d lib64 ]]; then
|
||||||
libdir="lib"
|
|
||||||
elif [[ -d lib64 ]]; then
|
|
||||||
libdir="lib64"
|
libdir="lib64"
|
||||||
|
elif [[ -d lib ]]; then
|
||||||
|
libdir="lib"
|
||||||
else
|
else
|
||||||
echo "ls *, */*, */*/*:"
|
echo "ls *, */*, */*/*:"
|
||||||
ls *
|
ls *
|
||||||
|
@ -80,7 +104,15 @@ else
|
||||||
echo "unknown lib dir"
|
echo "unknown lib dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep absl::strings "${libdir}"/cmake/absl/abslTargets.cmake; then
|
if [[ "${lts_install}" ]]; then
|
||||||
|
# LTS versions append the date of the release to the subdir.
|
||||||
|
# 9999/99/99 is the dummy date used in the local_lts workflow.
|
||||||
|
absl_subdir="absl_99999999"
|
||||||
|
else
|
||||||
|
absl_subdir="absl"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep absl::strings "${libdir}/cmake/${absl_subdir}/abslTargets.cmake"; then
|
||||||
cat "${libdir}"/cmake/absl/abslTargets.cmake
|
cat "${libdir}"/cmake/absl/abslTargets.cmake
|
||||||
echo "CMake targets named incorrectly"
|
echo "CMake targets named incorrectly"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -89,6 +121,7 @@ fi
|
||||||
uninstall_absl
|
uninstall_absl
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
if [[ ! "${lts_install}" ]]; then
|
||||||
# Test that we warn if installed without a prefix or a system prefix
|
# Test that we warn if installed without a prefix or a system prefix
|
||||||
output="$(install_absl 2>&1)"
|
output="$(install_absl 2>&1)"
|
||||||
if [[ "${output}" != *"Please set CMAKE_INSTALL_PREFIX"* ]]; then
|
if [[ "${output}" != *"Please set CMAKE_INSTALL_PREFIX"* ]]; then
|
||||||
|
@ -105,6 +138,7 @@ if [[ "${output}" != *"Please set CMAKE_INSTALL_PREFIX"* ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
uninstall_absl
|
uninstall_absl
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Install test complete!"
|
echo "Install test complete!"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -22,13 +22,14 @@
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
# Compiler id for Apple Clang is now AppleClang.
|
# Compiler id for Apple Clang is now AppleClang.
|
||||||
if (POLICY CMP0025)
|
|
||||||
cmake_policy(SET CMP0025 NEW)
|
cmake_policy(SET CMP0025 NEW)
|
||||||
endif()
|
|
||||||
|
|
||||||
# if command can use IN_LIST
|
# if command can use IN_LIST
|
||||||
cmake_policy(SET CMP0057 NEW)
|
cmake_policy(SET CMP0057 NEW)
|
||||||
|
|
||||||
|
# Project version variables are the empty std::string if version is unspecified
|
||||||
|
cmake_policy(SET CMP0048 NEW)
|
||||||
|
|
||||||
project(absl)
|
project(absl)
|
||||||
|
|
||||||
# when absl is included as subproject (i.e. using add_subdirectory(abseil-cpp))
|
# when absl is included as subproject (i.e. using add_subdirectory(abseil-cpp))
|
||||||
|
@ -44,7 +45,7 @@ list(APPEND CMAKE_MODULE_PATH
|
||||||
${CMAKE_CURRENT_LIST_DIR}/absl/copts
|
${CMAKE_CURRENT_LIST_DIR}/absl/copts
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(AbseilInstallDirs)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
include(AbseilHelpers)
|
include(AbseilHelpers)
|
||||||
|
|
||||||
|
@ -85,6 +86,7 @@ if(${ABSL_RUN_TESTS})
|
||||||
enable_testing()
|
enable_testing()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# absl:lts-remove-begin(system installation is supported for LTS releases)
|
||||||
# We don't support system-wide installation
|
# We don't support system-wide installation
|
||||||
list(APPEND SYSTEM_INSTALL_DIRS "/usr/local" "/usr" "/opt/" "/opt/local" "c:/Program Files/${PROJECT_NAME}")
|
list(APPEND SYSTEM_INSTALL_DIRS "/usr/local" "/usr" "/opt/" "/opt/local" "c:/Program Files/${PROJECT_NAME}")
|
||||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX OR CMAKE_INSTALL_PREFIX IN_LIST SYSTEM_INSTALL_DIRS)
|
if(NOT DEFINED CMAKE_INSTALL_PREFIX OR CMAKE_INSTALL_PREFIX IN_LIST SYSTEM_INSTALL_DIRS)
|
||||||
|
@ -94,6 +96,7 @@ releases of Abseil. Please set CMAKE_INSTALL_PREFIX to install Abseil in your \
|
||||||
source or build tree directly.\
|
source or build tree directly.\
|
||||||
")
|
")
|
||||||
endif()
|
endif()
|
||||||
|
# absl:lts-remove-end
|
||||||
|
|
||||||
## check targets
|
## check targets
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
|
@ -118,25 +121,40 @@ endif()
|
||||||
|
|
||||||
add_subdirectory(absl)
|
add_subdirectory(absl)
|
||||||
|
|
||||||
|
if (ABSL_ENABLE_INSTALL)
|
||||||
# install as a subdirectory only
|
# install as a subdirectory only
|
||||||
install(EXPORT ${PROJECT_NAME}Targets
|
install(EXPORT ${PROJECT_NAME}Targets
|
||||||
NAMESPACE absl::
|
NAMESPACE absl::
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
DESTINATION "${ABSL_INSTALL_CONFIGDIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
configure_package_config_file(
|
configure_package_config_file(
|
||||||
CMake/abslConfig.cmake.in
|
CMake/abslConfig.cmake.in
|
||||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||||
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
INSTALL_DESTINATION "${ABSL_INSTALL_CONFIGDIR}"
|
||||||
|
)
|
||||||
|
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||||
|
DESTINATION "${ABSL_INSTALL_CONFIGDIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
# Abseil only has a version in LTS releases. This mechanism is accomplished
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
# Abseil's internal Copybara (https://github.com/google/copybara) workflows and
|
||||||
|
# isn't visible in the CMake buildsystem itself.
|
||||||
|
if (absl_VERSION)
|
||||||
|
write_basic_package_version_file(
|
||||||
|
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||||
|
COMPATIBILITY ExactVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||||
|
DESTINATION ${ABSL_INSTALL_CONFIGDIR}
|
||||||
|
)
|
||||||
|
endif() # absl_VERSION
|
||||||
|
|
||||||
install(DIRECTORY absl
|
install(DIRECTORY absl
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
DESTINATION ${ABSL_INSTALL_INCLUDEDIR}
|
||||||
FILES_MATCHING
|
FILES_MATCHING
|
||||||
PATTERN "*.inc"
|
PATTERN "*.inc"
|
||||||
PATTERN "*.h"
|
PATTERN "*.h"
|
||||||
)
|
)
|
||||||
|
endif() # ABSL_ENABLE_INSTALL
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -28,6 +29,7 @@ cc_library(
|
||||||
name = "algorithm",
|
name = "algorithm",
|
||||||
hdrs = ["algorithm.h"],
|
hdrs = ["algorithm.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_test(
|
cc_test(
|
||||||
|
@ -35,6 +37,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["algorithm_test.cc"],
|
srcs = ["algorithm_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":algorithm",
|
":algorithm",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
@ -45,6 +48,7 @@ cc_test(
|
||||||
name = "algorithm_benchmark",
|
name = "algorithm_benchmark",
|
||||||
srcs = ["equal_benchmark.cc"],
|
srcs = ["equal_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["benchmark"],
|
tags = ["benchmark"],
|
||||||
deps = [
|
deps = [
|
||||||
":algorithm",
|
":algorithm",
|
||||||
|
@ -59,6 +63,7 @@ cc_library(
|
||||||
"container.h",
|
"container.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":algorithm",
|
":algorithm",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
@ -70,6 +75,7 @@ cc_test(
|
||||||
name = "container_test",
|
name = "container_test",
|
||||||
srcs = ["container_test.cc"],
|
srcs = ["container_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":container",
|
":container",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
"ABSL_EXCEPTIONS_FLAG",
|
"ABSL_EXCEPTIONS_FLAG",
|
||||||
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
||||||
|
@ -40,6 +41,7 @@ cc_library(
|
||||||
"internal/spinlock_wait.h",
|
"internal/spinlock_wait.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl/base:__pkg__",
|
"//absl/base:__pkg__",
|
||||||
],
|
],
|
||||||
|
@ -53,6 +55,7 @@ cc_library(
|
||||||
"policy_checks.h",
|
"policy_checks.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
|
@ -61,6 +64,7 @@ cc_library(
|
||||||
hdrs = ["dynamic_annotations.h"],
|
hdrs = ["dynamic_annotations.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
defines = ["__CLANG_SUPPORT_DYN_ANNOTATION__"],
|
defines = ["__CLANG_SUPPORT_DYN_ANNOTATION__"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
|
@ -74,6 +78,7 @@ cc_library(
|
||||||
"thread_annotations.h",
|
"thread_annotations.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":config",
|
":config",
|
||||||
],
|
],
|
||||||
|
@ -92,7 +97,7 @@ cc_library(
|
||||||
linkopts = select({
|
linkopts = select({
|
||||||
"//absl:windows": [],
|
"//absl:windows": [],
|
||||||
"//conditions:default": ["-pthread"],
|
"//conditions:default": ["-pthread"],
|
||||||
}),
|
}) + ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -115,6 +120,7 @@ cc_library(
|
||||||
"internal/scheduling_mode.h",
|
"internal/scheduling_mode.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -149,7 +155,7 @@ cc_library(
|
||||||
linkopts = select({
|
linkopts = select({
|
||||||
"//absl:windows": [],
|
"//absl:windows": [],
|
||||||
"//conditions:default": ["-pthread"],
|
"//conditions:default": ["-pthread"],
|
||||||
}),
|
}) + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base_internal",
|
":base_internal",
|
||||||
":config",
|
":config",
|
||||||
|
@ -164,6 +170,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/atomic_hook_test.cc"],
|
srcs = ["internal/atomic_hook_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
":core_headers",
|
":core_headers",
|
||||||
|
@ -178,6 +185,7 @@ cc_test(
|
||||||
"bit_cast_test.cc",
|
"bit_cast_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
":core_headers",
|
":core_headers",
|
||||||
|
@ -190,7 +198,7 @@ cc_library(
|
||||||
srcs = ["internal/throw_delegate.cc"],
|
srcs = ["internal/throw_delegate.cc"],
|
||||||
hdrs = ["internal/throw_delegate.h"],
|
hdrs = ["internal/throw_delegate.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -204,7 +212,7 @@ cc_test(
|
||||||
name = "throw_delegate_test",
|
name = "throw_delegate_test",
|
||||||
srcs = ["throw_delegate_test.cc"],
|
srcs = ["throw_delegate_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":throw_delegate",
|
":throw_delegate",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
@ -216,6 +224,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/exception_testing.h"],
|
hdrs = ["internal/exception_testing.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -228,6 +237,7 @@ cc_library(
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "pretty_function",
|
name = "pretty_function",
|
||||||
hdrs = ["internal/pretty_function.h"],
|
hdrs = ["internal/pretty_function.h"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//absl:__subpackages__"],
|
visibility = ["//absl:__subpackages__"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -237,7 +247,7 @@ cc_library(
|
||||||
srcs = ["internal/exception_safety_testing.cc"],
|
srcs = ["internal/exception_safety_testing.cc"],
|
||||||
hdrs = ["internal/exception_safety_testing.h"],
|
hdrs = ["internal/exception_safety_testing.h"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":config",
|
":config",
|
||||||
":pretty_function",
|
":pretty_function",
|
||||||
|
@ -253,7 +263,7 @@ cc_test(
|
||||||
name = "exception_safety_testing_test",
|
name = "exception_safety_testing_test",
|
||||||
srcs = ["exception_safety_testing_test.cc"],
|
srcs = ["exception_safety_testing_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":exception_safety_testing",
|
":exception_safety_testing",
|
||||||
"//absl/memory",
|
"//absl/memory",
|
||||||
|
@ -271,6 +281,7 @@ cc_test(
|
||||||
"internal/inline_variable_testing.h",
|
"internal/inline_variable_testing.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base_internal",
|
":base_internal",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
@ -282,6 +293,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["invoke_test.cc"],
|
srcs = ["invoke_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base_internal",
|
":base_internal",
|
||||||
"//absl/memory",
|
"//absl/memory",
|
||||||
|
@ -297,6 +309,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = ["spinlock_test_common.cc"],
|
srcs = ["spinlock_test_common.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
":core_headers",
|
":core_headers",
|
||||||
|
@ -312,7 +325,7 @@ cc_test(
|
||||||
size = "medium",
|
size = "medium",
|
||||||
srcs = ["spinlock_test_common.cc"],
|
srcs = ["spinlock_test_common.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
tags = ["no_test_wasm"],
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
":core_headers",
|
":core_headers",
|
||||||
|
@ -327,6 +340,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = ["internal/spinlock_benchmark.cc"],
|
srcs = ["internal/spinlock_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl/base:__pkg__",
|
"//absl/base:__pkg__",
|
||||||
],
|
],
|
||||||
|
@ -343,6 +357,7 @@ cc_binary(
|
||||||
name = "spinlock_benchmark",
|
name = "spinlock_benchmark",
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
":spinlock_benchmark_common",
|
":spinlock_benchmark_common",
|
||||||
|
@ -356,6 +371,7 @@ cc_library(
|
||||||
"internal/unaligned_access.h",
|
"internal/unaligned_access.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":config",
|
":config",
|
||||||
":core_headers",
|
":core_headers",
|
||||||
|
@ -378,9 +394,7 @@ cc_test(
|
||||||
name = "config_test",
|
name = "config_test",
|
||||||
srcs = ["config_test.cc"],
|
srcs = ["config_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
tags = [
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
"no_test_wasm",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
":config",
|
":config",
|
||||||
"//absl/synchronization:thread_pool",
|
"//absl/synchronization:thread_pool",
|
||||||
|
@ -392,9 +406,7 @@ cc_test(
|
||||||
name = "call_once_test",
|
name = "call_once_test",
|
||||||
srcs = ["call_once_test.cc"],
|
srcs = ["call_once_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
tags = [
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
"no_test_wasm",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
":core_headers",
|
":core_headers",
|
||||||
|
@ -407,6 +419,7 @@ cc_test(
|
||||||
name = "raw_logging_test",
|
name = "raw_logging_test",
|
||||||
srcs = ["raw_logging_test.cc"],
|
srcs = ["raw_logging_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
"//absl/strings",
|
"//absl/strings",
|
||||||
|
@ -419,6 +432,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/sysinfo_test.cc"],
|
srcs = ["internal/sysinfo_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
"//absl/synchronization",
|
"//absl/synchronization",
|
||||||
|
@ -431,6 +445,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/low_level_alloc_test.cc"],
|
srcs = ["internal/low_level_alloc_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["no_test_ios_x86_64"],
|
tags = ["no_test_ios_x86_64"],
|
||||||
deps = [":malloc_internal"],
|
deps = [":malloc_internal"],
|
||||||
)
|
)
|
||||||
|
@ -440,9 +455,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/thread_identity_test.cc"],
|
srcs = ["internal/thread_identity_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
tags = [
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
"no_test_wasm",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
":base",
|
":base",
|
||||||
":core_headers",
|
":core_headers",
|
||||||
|
@ -455,6 +468,7 @@ cc_test(
|
||||||
name = "thread_identity_benchmark",
|
name = "thread_identity_benchmark",
|
||||||
srcs = ["internal/thread_identity_benchmark.cc"],
|
srcs = ["internal/thread_identity_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["benchmark"],
|
tags = ["benchmark"],
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -467,6 +481,7 @@ cc_test(
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "bits",
|
name = "bits",
|
||||||
hdrs = ["internal/bits.h"],
|
hdrs = ["internal/bits.h"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -478,6 +493,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/bits_test.cc"],
|
srcs = ["internal/bits_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":bits",
|
":bits",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
@ -489,6 +505,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = ["internal/scoped_set_env.cc"],
|
srcs = ["internal/scoped_set_env.cc"],
|
||||||
hdrs = ["internal/scoped_set_env.h"],
|
hdrs = ["internal/scoped_set_env.h"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -500,6 +517,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/scoped_set_env_test.cc"],
|
srcs = ["internal/scoped_set_env_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":scoped_set_env",
|
":scoped_set_env",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_EXCEPTIONS_FLAG",
|
"ABSL_EXCEPTIONS_FLAG",
|
||||||
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
|
@ -30,6 +31,7 @@ cc_library(
|
||||||
name = "compressed_tuple",
|
name = "compressed_tuple",
|
||||||
hdrs = ["internal/compressed_tuple.h"],
|
hdrs = ["internal/compressed_tuple.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/utility",
|
"//absl/utility",
|
||||||
],
|
],
|
||||||
|
@ -39,6 +41,7 @@ cc_test(
|
||||||
name = "compressed_tuple_test",
|
name = "compressed_tuple_test",
|
||||||
srcs = ["internal/compressed_tuple_test.cc"],
|
srcs = ["internal/compressed_tuple_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":compressed_tuple",
|
":compressed_tuple",
|
||||||
"//absl/memory",
|
"//absl/memory",
|
||||||
|
@ -51,6 +54,7 @@ cc_library(
|
||||||
name = "fixed_array",
|
name = "fixed_array",
|
||||||
hdrs = ["fixed_array.h"],
|
hdrs = ["fixed_array.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":compressed_tuple",
|
":compressed_tuple",
|
||||||
"//absl/algorithm",
|
"//absl/algorithm",
|
||||||
|
@ -65,7 +69,7 @@ cc_test(
|
||||||
name = "fixed_array_test",
|
name = "fixed_array_test",
|
||||||
srcs = ["fixed_array_test.cc"],
|
srcs = ["fixed_array_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":fixed_array",
|
":fixed_array",
|
||||||
"//absl/base:exception_testing",
|
"//absl/base:exception_testing",
|
||||||
|
@ -79,6 +83,7 @@ cc_test(
|
||||||
name = "fixed_array_test_noexceptions",
|
name = "fixed_array_test_noexceptions",
|
||||||
srcs = ["fixed_array_test.cc"],
|
srcs = ["fixed_array_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":fixed_array",
|
":fixed_array",
|
||||||
"//absl/base:exception_testing",
|
"//absl/base:exception_testing",
|
||||||
|
@ -92,7 +97,7 @@ cc_test(
|
||||||
name = "fixed_array_exception_safety_test",
|
name = "fixed_array_exception_safety_test",
|
||||||
srcs = ["fixed_array_exception_safety_test.cc"],
|
srcs = ["fixed_array_exception_safety_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":fixed_array",
|
":fixed_array",
|
||||||
"//absl/base:exception_safety_testing",
|
"//absl/base:exception_safety_testing",
|
||||||
|
@ -104,6 +109,7 @@ cc_test(
|
||||||
name = "fixed_array_benchmark",
|
name = "fixed_array_benchmark",
|
||||||
srcs = ["fixed_array_benchmark.cc"],
|
srcs = ["fixed_array_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ["$(STACK_FRAME_UNLIMITED)"],
|
copts = ABSL_TEST_COPTS + ["$(STACK_FRAME_UNLIMITED)"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["benchmark"],
|
tags = ["benchmark"],
|
||||||
deps = [
|
deps = [
|
||||||
":fixed_array",
|
":fixed_array",
|
||||||
|
@ -115,6 +121,7 @@ cc_library(
|
||||||
name = "inlined_vector_internal",
|
name = "inlined_vector_internal",
|
||||||
hdrs = ["internal/inlined_vector.h"],
|
hdrs = ["internal/inlined_vector.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
],
|
],
|
||||||
|
@ -124,6 +131,7 @@ cc_library(
|
||||||
name = "inlined_vector",
|
name = "inlined_vector",
|
||||||
hdrs = ["inlined_vector.h"],
|
hdrs = ["inlined_vector.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":inlined_vector_internal",
|
":inlined_vector_internal",
|
||||||
"//absl/algorithm",
|
"//absl/algorithm",
|
||||||
|
@ -138,6 +146,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/counting_allocator.h"],
|
hdrs = ["internal/counting_allocator.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -145,7 +154,7 @@ cc_test(
|
||||||
name = "inlined_vector_test",
|
name = "inlined_vector_test",
|
||||||
srcs = ["inlined_vector_test.cc"],
|
srcs = ["inlined_vector_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":counting_allocator",
|
":counting_allocator",
|
||||||
":inlined_vector",
|
":inlined_vector",
|
||||||
|
@ -164,6 +173,7 @@ cc_test(
|
||||||
name = "inlined_vector_test_noexceptions",
|
name = "inlined_vector_test_noexceptions",
|
||||||
srcs = ["inlined_vector_test.cc"],
|
srcs = ["inlined_vector_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":counting_allocator",
|
":counting_allocator",
|
||||||
":inlined_vector",
|
":inlined_vector",
|
||||||
|
@ -182,6 +192,7 @@ cc_test(
|
||||||
name = "inlined_vector_benchmark",
|
name = "inlined_vector_benchmark",
|
||||||
srcs = ["inlined_vector_benchmark.cc"],
|
srcs = ["inlined_vector_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["benchmark"],
|
tags = ["benchmark"],
|
||||||
deps = [
|
deps = [
|
||||||
":inlined_vector",
|
":inlined_vector",
|
||||||
|
@ -197,6 +208,7 @@ cc_library(
|
||||||
srcs = ["internal/test_instance_tracker.cc"],
|
srcs = ["internal/test_instance_tracker.cc"],
|
||||||
hdrs = ["internal/test_instance_tracker.h"],
|
hdrs = ["internal/test_instance_tracker.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -206,6 +218,7 @@ cc_test(
|
||||||
name = "test_instance_tracker_test",
|
name = "test_instance_tracker_test",
|
||||||
srcs = ["internal/test_instance_tracker_test.cc"],
|
srcs = ["internal/test_instance_tracker_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":test_instance_tracker",
|
":test_instance_tracker",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
@ -230,6 +243,7 @@ cc_library(
|
||||||
name = "flat_hash_map",
|
name = "flat_hash_map",
|
||||||
hdrs = ["flat_hash_map.h"],
|
hdrs = ["flat_hash_map.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":container_memory",
|
":container_memory",
|
||||||
":hash_function_defaults",
|
":hash_function_defaults",
|
||||||
|
@ -243,6 +257,7 @@ cc_test(
|
||||||
name = "flat_hash_map_test",
|
name = "flat_hash_map_test",
|
||||||
srcs = ["flat_hash_map_test.cc"],
|
srcs = ["flat_hash_map_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS_NONMOBILE,
|
tags = NOTEST_TAGS_NONMOBILE,
|
||||||
deps = [
|
deps = [
|
||||||
":flat_hash_map",
|
":flat_hash_map",
|
||||||
|
@ -260,6 +275,7 @@ cc_library(
|
||||||
name = "flat_hash_set",
|
name = "flat_hash_set",
|
||||||
hdrs = ["flat_hash_set.h"],
|
hdrs = ["flat_hash_set.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":container_memory",
|
":container_memory",
|
||||||
":hash_function_defaults",
|
":hash_function_defaults",
|
||||||
|
@ -274,6 +290,7 @@ cc_test(
|
||||||
name = "flat_hash_set_test",
|
name = "flat_hash_set_test",
|
||||||
srcs = ["flat_hash_set_test.cc"],
|
srcs = ["flat_hash_set_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
|
copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS_NONMOBILE,
|
tags = NOTEST_TAGS_NONMOBILE,
|
||||||
deps = [
|
deps = [
|
||||||
":flat_hash_set",
|
":flat_hash_set",
|
||||||
|
@ -292,6 +309,7 @@ cc_library(
|
||||||
name = "node_hash_map",
|
name = "node_hash_map",
|
||||||
hdrs = ["node_hash_map.h"],
|
hdrs = ["node_hash_map.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":container_memory",
|
":container_memory",
|
||||||
":hash_function_defaults",
|
":hash_function_defaults",
|
||||||
|
@ -306,6 +324,7 @@ cc_test(
|
||||||
name = "node_hash_map_test",
|
name = "node_hash_map_test",
|
||||||
srcs = ["node_hash_map_test.cc"],
|
srcs = ["node_hash_map_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS_NONMOBILE,
|
tags = NOTEST_TAGS_NONMOBILE,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_generator_testing",
|
":hash_generator_testing",
|
||||||
|
@ -323,6 +342,7 @@ cc_library(
|
||||||
name = "node_hash_set",
|
name = "node_hash_set",
|
||||||
hdrs = ["node_hash_set.h"],
|
hdrs = ["node_hash_set.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_function_defaults",
|
":hash_function_defaults",
|
||||||
":node_hash_policy",
|
":node_hash_policy",
|
||||||
|
@ -336,6 +356,7 @@ cc_test(
|
||||||
name = "node_hash_set_test",
|
name = "node_hash_set_test",
|
||||||
srcs = ["node_hash_set_test.cc"],
|
srcs = ["node_hash_set_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
|
copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS_NONMOBILE,
|
tags = NOTEST_TAGS_NONMOBILE,
|
||||||
deps = [
|
deps = [
|
||||||
":node_hash_set",
|
":node_hash_set",
|
||||||
|
@ -351,6 +372,7 @@ cc_library(
|
||||||
name = "container_memory",
|
name = "container_memory",
|
||||||
hdrs = ["internal/container_memory.h"],
|
hdrs = ["internal/container_memory.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/memory",
|
"//absl/memory",
|
||||||
"//absl/utility",
|
"//absl/utility",
|
||||||
|
@ -361,6 +383,7 @@ cc_test(
|
||||||
name = "container_memory_test",
|
name = "container_memory_test",
|
||||||
srcs = ["internal/container_memory_test.cc"],
|
srcs = ["internal/container_memory_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS_NONMOBILE,
|
tags = NOTEST_TAGS_NONMOBILE,
|
||||||
deps = [
|
deps = [
|
||||||
":container_memory",
|
":container_memory",
|
||||||
|
@ -373,6 +396,7 @@ cc_library(
|
||||||
name = "hash_function_defaults",
|
name = "hash_function_defaults",
|
||||||
hdrs = ["internal/hash_function_defaults.h"],
|
hdrs = ["internal/hash_function_defaults.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
"//absl/hash",
|
"//absl/hash",
|
||||||
|
@ -384,6 +408,7 @@ cc_test(
|
||||||
name = "hash_function_defaults_test",
|
name = "hash_function_defaults_test",
|
||||||
srcs = ["internal/hash_function_defaults_test.cc"],
|
srcs = ["internal/hash_function_defaults_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS,
|
tags = NOTEST_TAGS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_function_defaults",
|
":hash_function_defaults",
|
||||||
|
@ -399,6 +424,7 @@ cc_library(
|
||||||
srcs = ["internal/hash_generator_testing.cc"],
|
srcs = ["internal/hash_generator_testing.cc"],
|
||||||
hdrs = ["internal/hash_generator_testing.h"],
|
hdrs = ["internal/hash_generator_testing.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
|
@ -411,6 +437,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/hash_policy_testing.h"],
|
hdrs = ["internal/hash_policy_testing.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/hash",
|
"//absl/hash",
|
||||||
"//absl/strings",
|
"//absl/strings",
|
||||||
|
@ -421,6 +448,7 @@ cc_test(
|
||||||
name = "hash_policy_testing_test",
|
name = "hash_policy_testing_test",
|
||||||
srcs = ["internal/hash_policy_testing_test.cc"],
|
srcs = ["internal/hash_policy_testing_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
@ -431,6 +459,7 @@ cc_library(
|
||||||
name = "hash_policy_traits",
|
name = "hash_policy_traits",
|
||||||
hdrs = ["internal/hash_policy_traits.h"],
|
hdrs = ["internal/hash_policy_traits.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = ["//absl/meta:type_traits"],
|
deps = ["//absl/meta:type_traits"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -438,6 +467,7 @@ cc_test(
|
||||||
name = "hash_policy_traits_test",
|
name = "hash_policy_traits_test",
|
||||||
srcs = ["internal/hash_policy_traits_test.cc"],
|
srcs = ["internal/hash_policy_traits_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_policy_traits",
|
":hash_policy_traits",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
@ -448,6 +478,7 @@ cc_library(
|
||||||
name = "hashtable_debug",
|
name = "hashtable_debug",
|
||||||
hdrs = ["internal/hashtable_debug.h"],
|
hdrs = ["internal/hashtable_debug.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hashtable_debug_hooks",
|
":hashtable_debug_hooks",
|
||||||
],
|
],
|
||||||
|
@ -457,6 +488,7 @@ cc_library(
|
||||||
name = "hashtable_debug_hooks",
|
name = "hashtable_debug_hooks",
|
||||||
hdrs = ["internal/hashtable_debug_hooks.h"],
|
hdrs = ["internal/hashtable_debug_hooks.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
|
@ -467,6 +499,7 @@ cc_library(
|
||||||
],
|
],
|
||||||
hdrs = ["internal/hashtablez_sampler.h"],
|
hdrs = ["internal/hashtablez_sampler.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":have_sse",
|
":have_sse",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -481,6 +514,7 @@ cc_library(
|
||||||
cc_test(
|
cc_test(
|
||||||
name = "hashtablez_sampler_test",
|
name = "hashtablez_sampler_test",
|
||||||
srcs = ["internal/hashtablez_sampler_test.cc"],
|
srcs = ["internal/hashtablez_sampler_test.cc"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hashtablez_sampler",
|
":hashtablez_sampler",
|
||||||
":have_sse",
|
":have_sse",
|
||||||
|
@ -496,12 +530,14 @@ cc_library(
|
||||||
name = "node_hash_policy",
|
name = "node_hash_policy",
|
||||||
hdrs = ["internal/node_hash_policy.h"],
|
hdrs = ["internal/node_hash_policy.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_test(
|
cc_test(
|
||||||
name = "node_hash_policy_test",
|
name = "node_hash_policy_test",
|
||||||
srcs = ["internal/node_hash_policy_test.cc"],
|
srcs = ["internal/node_hash_policy_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_policy_traits",
|
":hash_policy_traits",
|
||||||
":node_hash_policy",
|
":node_hash_policy",
|
||||||
|
@ -513,6 +549,7 @@ cc_library(
|
||||||
name = "raw_hash_map",
|
name = "raw_hash_map",
|
||||||
hdrs = ["internal/raw_hash_map.h"],
|
hdrs = ["internal/raw_hash_map.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":container_memory",
|
":container_memory",
|
||||||
":raw_hash_set",
|
":raw_hash_set",
|
||||||
|
@ -523,6 +560,7 @@ cc_library(
|
||||||
name = "have_sse",
|
name = "have_sse",
|
||||||
hdrs = ["internal/have_sse.h"],
|
hdrs = ["internal/have_sse.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -530,6 +568,7 @@ cc_library(
|
||||||
name = "common",
|
name = "common",
|
||||||
hdrs = ["internal/common.h"],
|
hdrs = ["internal/common.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
"//absl/types:optional",
|
"//absl/types:optional",
|
||||||
|
@ -541,6 +580,7 @@ cc_library(
|
||||||
srcs = ["internal/raw_hash_set.cc"],
|
srcs = ["internal/raw_hash_set.cc"],
|
||||||
hdrs = ["internal/raw_hash_set.h"],
|
hdrs = ["internal/raw_hash_set.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":common",
|
":common",
|
||||||
":compressed_tuple",
|
":compressed_tuple",
|
||||||
|
@ -584,6 +624,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/raw_hash_set_allocator_test.cc"],
|
srcs = ["internal/raw_hash_set_allocator_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":raw_hash_set",
|
":raw_hash_set",
|
||||||
":tracked",
|
":tracked",
|
||||||
|
@ -596,6 +637,7 @@ cc_library(
|
||||||
name = "layout",
|
name = "layout",
|
||||||
hdrs = ["internal/layout.h"],
|
hdrs = ["internal/layout.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
|
@ -610,6 +652,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["internal/layout_test.cc"],
|
srcs = ["internal/layout_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS,
|
tags = NOTEST_TAGS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -626,6 +669,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/tracked.h"],
|
hdrs = ["internal/tracked.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
|
@ -633,6 +677,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_map_constructor_test.h"],
|
hdrs = ["internal/unordered_map_constructor_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_generator_testing",
|
":hash_generator_testing",
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
|
@ -645,6 +690,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_map_lookup_test.h"],
|
hdrs = ["internal/unordered_map_lookup_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_generator_testing",
|
":hash_generator_testing",
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
|
@ -657,6 +703,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_map_modifiers_test.h"],
|
hdrs = ["internal/unordered_map_modifiers_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_generator_testing",
|
":hash_generator_testing",
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
|
@ -669,6 +716,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_set_constructor_test.h"],
|
hdrs = ["internal/unordered_set_constructor_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_generator_testing",
|
":hash_generator_testing",
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
|
@ -682,6 +730,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_set_members_test.h"],
|
hdrs = ["internal/unordered_set_members_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
"@com_google_googletest//:gtest",
|
"@com_google_googletest//:gtest",
|
||||||
|
@ -693,6 +742,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_map_members_test.h"],
|
hdrs = ["internal/unordered_map_members_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
"@com_google_googletest//:gtest",
|
"@com_google_googletest//:gtest",
|
||||||
|
@ -704,6 +754,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_set_lookup_test.h"],
|
hdrs = ["internal/unordered_set_lookup_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_generator_testing",
|
":hash_generator_testing",
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
|
@ -716,6 +767,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/unordered_set_modifiers_test.h"],
|
hdrs = ["internal/unordered_set_modifiers_test.h"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash_generator_testing",
|
":hash_generator_testing",
|
||||||
":hash_policy_testing",
|
":hash_policy_testing",
|
||||||
|
@ -727,6 +779,7 @@ cc_test(
|
||||||
name = "unordered_set_test",
|
name = "unordered_set_test",
|
||||||
srcs = ["internal/unordered_set_test.cc"],
|
srcs = ["internal/unordered_set_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS_NONMOBILE,
|
tags = NOTEST_TAGS_NONMOBILE,
|
||||||
deps = [
|
deps = [
|
||||||
":unordered_set_constructor_test",
|
":unordered_set_constructor_test",
|
||||||
|
@ -741,6 +794,7 @@ cc_test(
|
||||||
name = "unordered_map_test",
|
name = "unordered_map_test",
|
||||||
srcs = ["internal/unordered_map_test.cc"],
|
srcs = ["internal/unordered_map_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = NOTEST_TAGS_NONMOBILE,
|
tags = NOTEST_TAGS_NONMOBILE,
|
||||||
deps = [
|
deps = [
|
||||||
":unordered_map_constructor_test",
|
":unordered_map_constructor_test",
|
||||||
|
|
|
@ -454,7 +454,7 @@ class InlinedVector {
|
||||||
// Overload of `InlinedVector::operator=()` to replace the contents of the
|
// Overload of `InlinedVector::operator=()` to replace the contents of the
|
||||||
// inlined vector with the contents of `other`.
|
// inlined vector with the contents of `other`.
|
||||||
InlinedVector& operator=(const InlinedVector& other) {
|
InlinedVector& operator=(const InlinedVector& other) {
|
||||||
if (ABSL_PREDICT_FALSE(this == &other)) return *this;
|
if (ABSL_PREDICT_FALSE(this == std::addressof(other))) return *this;
|
||||||
|
|
||||||
// Optimized to avoid reallocation.
|
// Optimized to avoid reallocation.
|
||||||
// Prefer reassignment to copy construction for elements.
|
// Prefer reassignment to copy construction for elements.
|
||||||
|
@ -475,7 +475,7 @@ class InlinedVector {
|
||||||
// NOTE: As a result of calling this overload, `other` may be empty or it's
|
// NOTE: As a result of calling this overload, `other` may be empty or it's
|
||||||
// contents may be left in a moved-from state.
|
// contents may be left in a moved-from state.
|
||||||
InlinedVector& operator=(InlinedVector&& other) {
|
InlinedVector& operator=(InlinedVector&& other) {
|
||||||
if (ABSL_PREDICT_FALSE(this == &other)) return *this;
|
if (ABSL_PREDICT_FALSE(this == std::addressof(other))) return *this;
|
||||||
|
|
||||||
if (other.allocated()) {
|
if (other.allocated()) {
|
||||||
clear();
|
clear();
|
||||||
|
@ -840,7 +840,7 @@ class InlinedVector {
|
||||||
//
|
//
|
||||||
// Swaps the contents of this inlined vector with the contents of `other`.
|
// Swaps the contents of this inlined vector with the contents of `other`.
|
||||||
void swap(InlinedVector& other) {
|
void swap(InlinedVector& other) {
|
||||||
if (ABSL_PREDICT_FALSE(this == &other)) return;
|
if (ABSL_PREDICT_FALSE(this == std::addressof(other))) return;
|
||||||
|
|
||||||
SwapImpl(other);
|
SwapImpl(other);
|
||||||
}
|
}
|
||||||
|
@ -864,7 +864,8 @@ class InlinedVector {
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_allocation(const Allocation& allocation) {
|
void init_allocation(const Allocation& allocation) {
|
||||||
new (&storage_.rep_.allocation_storage.allocation) Allocation(allocation);
|
new (static_cast<void*>(std::addressof(
|
||||||
|
storage_.rep_.allocation_storage.allocation))) Allocation(allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(absl-team): investigate whether the reinterpret_cast is appropriate.
|
// TODO(absl-team): investigate whether the reinterpret_cast is appropriate.
|
||||||
|
@ -1154,7 +1155,7 @@ class InlinedVector {
|
||||||
if (!allocated() && !other.allocated()) {
|
if (!allocated() && !other.allocated()) {
|
||||||
// Both inlined: swap up to smaller size, then move remaining elements.
|
// Both inlined: swap up to smaller size, then move remaining elements.
|
||||||
InlinedVector* a = this;
|
InlinedVector* a = this;
|
||||||
InlinedVector* b = &other;
|
InlinedVector* b = std::addressof(other);
|
||||||
if (size() < other.size()) {
|
if (size() < other.size()) {
|
||||||
swap(a, b);
|
swap(a, b);
|
||||||
}
|
}
|
||||||
|
@ -1186,7 +1187,7 @@ class InlinedVector {
|
||||||
// pointer/capacity into the originally inlined vector and swap
|
// pointer/capacity into the originally inlined vector and swap
|
||||||
// the tags.
|
// the tags.
|
||||||
InlinedVector* a = this;
|
InlinedVector* a = this;
|
||||||
InlinedVector* b = &other;
|
InlinedVector* b = std::addressof(other);
|
||||||
if (a->allocated()) {
|
if (a->allocated()) {
|
||||||
swap(a, b);
|
swap(a, b);
|
||||||
}
|
}
|
||||||
|
@ -1305,10 +1306,4 @@ auto AbslHashValue(H h, const InlinedVector<TheT, TheN, TheA>& v) -> H {
|
||||||
}
|
}
|
||||||
} // namespace absl
|
} // namespace absl
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// Implementation of InlinedVector
|
|
||||||
//
|
|
||||||
// Do not depend on any below implementation details!
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#endif // ABSL_CONTAINER_INLINED_VECTOR_H_
|
#endif // ABSL_CONTAINER_INLINED_VECTOR_H_
|
||||||
|
|
|
@ -1785,7 +1785,7 @@ TEST(Table, IterationOrderChangesByInstance) {
|
||||||
|
|
||||||
std::vector<IntTable> tables;
|
std::vector<IntTable> tables;
|
||||||
bool found_difference = false;
|
bool found_difference = false;
|
||||||
for (int i = 0; !found_difference && i < 500; ++i) {
|
for (int i = 0; !found_difference && i < 5000; ++i) {
|
||||||
tables.push_back(MakeSimpleTable(size));
|
tables.push_back(MakeSimpleTable(size));
|
||||||
found_difference = OrderOfIteration(tables.back()) != reference;
|
found_difference = OrderOfIteration(tables.back()) != reference;
|
||||||
}
|
}
|
||||||
|
@ -1799,7 +1799,7 @@ TEST(Table, IterationOrderChangesByInstance) {
|
||||||
|
|
||||||
TEST(Table, IterationOrderChangesOnRehash) {
|
TEST(Table, IterationOrderChangesOnRehash) {
|
||||||
std::vector<IntTable> garbage;
|
std::vector<IntTable> garbage;
|
||||||
for (int i = 0; i < 500; ++i) {
|
for (int i = 0; i < 5000; ++i) {
|
||||||
auto t = MakeSimpleTable(20);
|
auto t = MakeSimpleTable(20);
|
||||||
const auto reference = OrderOfIteration(t);
|
const auto reference = OrderOfIteration(t);
|
||||||
// Force rehash to the same size.
|
// Force rehash to the same size.
|
||||||
|
|
|
@ -3,6 +3,7 @@ include(GENERATED_AbseilCopts)
|
||||||
|
|
||||||
set(ABSL_LSAN_LINKOPTS "")
|
set(ABSL_LSAN_LINKOPTS "")
|
||||||
set(ABSL_HAVE_LSAN OFF)
|
set(ABSL_HAVE_LSAN OFF)
|
||||||
|
set(ABSL_DEFAULT_LINKOPTS "")
|
||||||
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
set(ABSL_DEFAULT_COPTS "${ABSL_GCC_FLAGS}")
|
set(ABSL_DEFAULT_COPTS "${ABSL_GCC_FLAGS}")
|
||||||
|
@ -19,6 +20,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
set(ABSL_DEFAULT_COPTS "${ABSL_LLVM_FLAGS}")
|
set(ABSL_DEFAULT_COPTS "${ABSL_LLVM_FLAGS}")
|
||||||
set(ABSL_TEST_COPTS "${ABSL_LLVM_FLAGS};${ABSL_LLVM_TEST_FLAGS}")
|
set(ABSL_TEST_COPTS "${ABSL_LLVM_FLAGS};${ABSL_LLVM_TEST_FLAGS}")
|
||||||
set(ABSL_EXCEPTIONS_FLAG "${ABSL_LLVM_EXCEPTIONS_FLAGS}")
|
set(ABSL_EXCEPTIONS_FLAG "${ABSL_LLVM_EXCEPTIONS_FLAGS}")
|
||||||
|
set(ABSL_DEFAULT_LINKOPTS "${ABSL_MSVC_LINKOPTS}")
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
# AppleClang doesn't have lsan
|
# AppleClang doesn't have lsan
|
||||||
# https://developer.apple.com/documentation/code_diagnostics
|
# https://developer.apple.com/documentation/code_diagnostics
|
||||||
|
@ -32,6 +34,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
set(ABSL_DEFAULT_COPTS "${ABSL_MSVC_FLAGS}")
|
set(ABSL_DEFAULT_COPTS "${ABSL_MSVC_FLAGS}")
|
||||||
set(ABSL_TEST_COPTS "${ABSL_MSVC_FLAGS};${ABSL_MSVC_TEST_FLAGS}")
|
set(ABSL_TEST_COPTS "${ABSL_MSVC_FLAGS};${ABSL_MSVC_TEST_FLAGS}")
|
||||||
set(ABSL_EXCEPTIONS_FLAG "${ABSL_MSVC_EXCEPTIONS_FLAGS}")
|
set(ABSL_EXCEPTIONS_FLAG "${ABSL_MSVC_EXCEPTIONS_FLAGS}")
|
||||||
|
set(ABSL_DEFAULT_LINKOPTS "${ABSL_MSVC_LINKOPTS}")
|
||||||
else()
|
else()
|
||||||
message(WARNING "Unknown compiler: ${CMAKE_CXX_COMPILER}. Building with no default flags")
|
message(WARNING "Unknown compiler: ${CMAKE_CXX_COMPILER}. Building with no default flags")
|
||||||
set(ABSL_DEFAULT_COPTS "")
|
set(ABSL_DEFAULT_COPTS "")
|
||||||
|
|
|
@ -201,6 +201,10 @@ list(APPEND ABSL_MSVC_FLAGS
|
||||||
"/wd4800"
|
"/wd4800"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
list(APPEND ABSL_MSVC_LINKOPTS
|
||||||
|
"-ignore:4221"
|
||||||
|
)
|
||||||
|
|
||||||
list(APPEND ABSL_MSVC_TEST_FLAGS
|
list(APPEND ABSL_MSVC_TEST_FLAGS
|
||||||
"/wd4018"
|
"/wd4018"
|
||||||
"/wd4101"
|
"/wd4101"
|
||||||
|
|
|
@ -202,6 +202,10 @@ ABSL_MSVC_FLAGS = [
|
||||||
"/wd4800",
|
"/wd4800",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
ABSL_MSVC_LINKOPTS = [
|
||||||
|
"-ignore:4221",
|
||||||
|
]
|
||||||
|
|
||||||
ABSL_MSVC_TEST_FLAGS = [
|
ABSL_MSVC_TEST_FLAGS = [
|
||||||
"/wd4018",
|
"/wd4018",
|
||||||
"/wd4101",
|
"/wd4101",
|
||||||
|
|
|
@ -14,6 +14,7 @@ load(
|
||||||
"ABSL_LLVM_TEST_FLAGS",
|
"ABSL_LLVM_TEST_FLAGS",
|
||||||
"ABSL_MSVC_EXCEPTIONS_FLAGS",
|
"ABSL_MSVC_EXCEPTIONS_FLAGS",
|
||||||
"ABSL_MSVC_FLAGS",
|
"ABSL_MSVC_FLAGS",
|
||||||
|
"ABSL_MSVC_LINKOPTS",
|
||||||
"ABSL_MSVC_TEST_FLAGS",
|
"ABSL_MSVC_TEST_FLAGS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -40,3 +41,8 @@ ABSL_EXCEPTIONS_FLAG = select({
|
||||||
ABSL_EXCEPTIONS_FLAG_LINKOPTS = select({
|
ABSL_EXCEPTIONS_FLAG_LINKOPTS = select({
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ABSL_DEFAULT_LINKOPTS = select({
|
||||||
|
"//absl:windows": ABSL_MSVC_LINKOPTS,
|
||||||
|
"//conditions:default": [],
|
||||||
|
})
|
||||||
|
|
|
@ -153,19 +153,27 @@ COPT_VARS = {
|
||||||
"-Wno-unused-private-field",
|
"-Wno-unused-private-field",
|
||||||
],
|
],
|
||||||
"ABSL_GCC_EXCEPTIONS_FLAGS": ["-fexceptions"],
|
"ABSL_GCC_EXCEPTIONS_FLAGS": ["-fexceptions"],
|
||||||
"ABSL_LLVM_FLAGS": LLVM_BIG_WARNING_FLAGS + LLVM_DISABLE_WARNINGS_FLAGS,
|
"ABSL_LLVM_FLAGS":
|
||||||
"ABSL_LLVM_TEST_FLAGS": LLVM_TEST_DISABLE_WARNINGS_FLAGS,
|
LLVM_BIG_WARNING_FLAGS + LLVM_DISABLE_WARNINGS_FLAGS,
|
||||||
|
"ABSL_LLVM_TEST_FLAGS":
|
||||||
|
LLVM_TEST_DISABLE_WARNINGS_FLAGS,
|
||||||
"ABSL_LLVM_EXCEPTIONS_FLAGS": ["-fexceptions"],
|
"ABSL_LLVM_EXCEPTIONS_FLAGS": ["-fexceptions"],
|
||||||
"ABSL_CLANG_CL_FLAGS": (MSVC_BIG_WARNING_FLAGS +
|
"ABSL_CLANG_CL_FLAGS": (
|
||||||
LLVM_DISABLE_WARNINGS_FLAGS + MSVC_DEFINES),
|
MSVC_BIG_WARNING_FLAGS + LLVM_DISABLE_WARNINGS_FLAGS + MSVC_DEFINES),
|
||||||
"ABSL_CLANG_CL_TEST_FLAGS": LLVM_TEST_DISABLE_WARNINGS_FLAGS,
|
"ABSL_CLANG_CL_TEST_FLAGS":
|
||||||
"ABSL_CLANG_CL_EXCEPTIONS_FLAGS": MSVC_STYLE_EXCEPTIONS_FLAGS,
|
LLVM_TEST_DISABLE_WARNINGS_FLAGS,
|
||||||
"ABSL_MSVC_FLAGS": MSVC_BIG_WARNING_FLAGS + MSVC_DEFINES + [
|
"ABSL_CLANG_CL_EXCEPTIONS_FLAGS":
|
||||||
|
MSVC_STYLE_EXCEPTIONS_FLAGS,
|
||||||
|
"ABSL_MSVC_FLAGS":
|
||||||
|
MSVC_BIG_WARNING_FLAGS + MSVC_DEFINES + [
|
||||||
"/wd4005", # macro-redefinition
|
"/wd4005", # macro-redefinition
|
||||||
"/wd4068", # unknown pragma
|
"/wd4068", # unknown pragma
|
||||||
"/wd4180", # qualifier applied to function type has no meaning; ignored
|
# qualifier applied to function type has no meaning; ignored
|
||||||
"/wd4244", # conversion from 'type1' to 'type2', possible loss of data
|
"/wd4180",
|
||||||
"/wd4267", # conversion from 'size_t' to 'type', possible loss of data
|
# conversion from 'type1' to 'type2', possible loss of data
|
||||||
|
"/wd4244",
|
||||||
|
# conversion from 'size_t' to 'type', possible loss of data
|
||||||
|
"/wd4267",
|
||||||
# forcing value to bool 'true' or 'false' (performance warning)
|
# forcing value to bool 'true' or 'false' (performance warning)
|
||||||
"/wd4800",
|
"/wd4800",
|
||||||
],
|
],
|
||||||
|
@ -174,5 +182,10 @@ COPT_VARS = {
|
||||||
"/wd4101", # unreferenced local variable
|
"/wd4101", # unreferenced local variable
|
||||||
"/wd4503", # decorated name length exceeded, name was truncated
|
"/wd4503", # decorated name length exceeded, name was truncated
|
||||||
],
|
],
|
||||||
"ABSL_MSVC_EXCEPTIONS_FLAGS": MSVC_STYLE_EXCEPTIONS_FLAGS,
|
"ABSL_MSVC_EXCEPTIONS_FLAGS":
|
||||||
|
MSVC_STYLE_EXCEPTIONS_FLAGS,
|
||||||
|
"ABSL_MSVC_LINKOPTS": [
|
||||||
|
# Object file doesn't export any previously undefined symbols
|
||||||
|
"/ignore:4221",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ cc_library(
|
||||||
],
|
],
|
||||||
hdrs = ["stacktrace.h"],
|
hdrs = ["stacktrace.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":debugging_internal",
|
":debugging_internal",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -53,6 +55,7 @@ cc_library(
|
||||||
"symbolize.h",
|
"symbolize.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":debugging_internal",
|
":debugging_internal",
|
||||||
":demangle_internal",
|
":demangle_internal",
|
||||||
|
@ -66,6 +69,7 @@ cc_test(
|
||||||
name = "symbolize_test",
|
name = "symbolize_test",
|
||||||
srcs = ["symbolize_test.cc"],
|
srcs = ["symbolize_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":stack_consumption",
|
":stack_consumption",
|
||||||
":symbolize",
|
":symbolize",
|
||||||
|
@ -85,6 +89,7 @@ cc_library(
|
||||||
"internal/examine_stack.h",
|
"internal/examine_stack.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
":stacktrace",
|
":stacktrace",
|
||||||
|
@ -99,6 +104,7 @@ cc_library(
|
||||||
srcs = ["failure_signal_handler.cc"],
|
srcs = ["failure_signal_handler.cc"],
|
||||||
hdrs = ["failure_signal_handler.h"],
|
hdrs = ["failure_signal_handler.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":examine_stack",
|
":examine_stack",
|
||||||
":stacktrace",
|
":stacktrace",
|
||||||
|
@ -115,7 +121,7 @@ cc_test(
|
||||||
linkopts = select({
|
linkopts = select({
|
||||||
"//absl:windows": [],
|
"//absl:windows": [],
|
||||||
"//conditions:default": ["-pthread"],
|
"//conditions:default": ["-pthread"],
|
||||||
}),
|
}) + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":failure_signal_handler",
|
":failure_signal_handler",
|
||||||
":stacktrace",
|
":stacktrace",
|
||||||
|
@ -147,6 +153,7 @@ cc_library(
|
||||||
"internal/vdso_support.h",
|
"internal/vdso_support.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
@ -169,6 +176,7 @@ cc_test(
|
||||||
name = "demangle_test",
|
name = "demangle_test",
|
||||||
srcs = ["internal/demangle_test.cc"],
|
srcs = ["internal/demangle_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":demangle_internal",
|
":demangle_internal",
|
||||||
":stack_consumption",
|
":stack_consumption",
|
||||||
|
@ -183,6 +191,7 @@ cc_library(
|
||||||
name = "leak_check",
|
name = "leak_check",
|
||||||
srcs = ["leak_check.cc"],
|
srcs = ["leak_check.cc"],
|
||||||
hdrs = ["leak_check.h"],
|
hdrs = ["leak_check.h"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = ["//absl/base:core_headers"],
|
deps = ["//absl/base:core_headers"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -192,6 +201,7 @@ cc_library(
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "leak_check_disable",
|
name = "leak_check_disable",
|
||||||
srcs = ["leak_check_disable.cc"],
|
srcs = ["leak_check_disable.cc"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
alwayslink = 1,
|
alwayslink = 1,
|
||||||
)
|
)
|
||||||
|
@ -212,6 +222,7 @@ cc_library(
|
||||||
"//absl:llvm_compiler": ["-DLEAK_SANITIZER"],
|
"//absl:llvm_compiler": ["-DLEAK_SANITIZER"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -221,6 +232,7 @@ cc_library(
|
||||||
srcs = ["leak_check.cc"],
|
srcs = ["leak_check.cc"],
|
||||||
hdrs = ["leak_check.h"],
|
hdrs = ["leak_check.h"],
|
||||||
copts = ["-ULEAK_SANITIZER"],
|
copts = ["-ULEAK_SANITIZER"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -231,7 +243,7 @@ cc_test(
|
||||||
"//absl:llvm_compiler": ["-DABSL_EXPECT_LEAK_SANITIZER"],
|
"//absl:llvm_compiler": ["-DABSL_EXPECT_LEAK_SANITIZER"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
linkopts = ABSL_LSAN_LINKOPTS,
|
linkopts = ABSL_LSAN_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":leak_check_api_enabled_for_testing",
|
":leak_check_api_enabled_for_testing",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -243,6 +255,7 @@ cc_test(
|
||||||
name = "leak_check_no_lsan_test",
|
name = "leak_check_no_lsan_test",
|
||||||
srcs = ["leak_check_test.cc"],
|
srcs = ["leak_check_test.cc"],
|
||||||
copts = ["-UABSL_EXPECT_LEAK_SANITIZER"],
|
copts = ["-UABSL_EXPECT_LEAK_SANITIZER"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":leak_check_api_disabled_for_testing",
|
":leak_check_api_disabled_for_testing",
|
||||||
"//absl/base", # for raw_logging
|
"//absl/base", # for raw_logging
|
||||||
|
@ -257,7 +270,7 @@ cc_test(
|
||||||
cc_test(
|
cc_test(
|
||||||
name = "disabled_leak_check_test",
|
name = "disabled_leak_check_test",
|
||||||
srcs = ["leak_check_fail_test.cc"],
|
srcs = ["leak_check_fail_test.cc"],
|
||||||
linkopts = ABSL_LSAN_LINKOPTS,
|
linkopts = ABSL_LSAN_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":leak_check_api_enabled_for_testing",
|
":leak_check_api_enabled_for_testing",
|
||||||
":leak_check_disable",
|
":leak_check_disable",
|
||||||
|
@ -272,6 +285,7 @@ cc_library(
|
||||||
srcs = ["internal/stack_consumption.cc"],
|
srcs = ["internal/stack_consumption.cc"],
|
||||||
hdrs = ["internal/stack_consumption.h"],
|
hdrs = ["internal/stack_consumption.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -283,6 +297,7 @@ cc_test(
|
||||||
name = "stack_consumption_test",
|
name = "stack_consumption_test",
|
||||||
srcs = ["internal/stack_consumption_test.cc"],
|
srcs = ["internal/stack_consumption_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":stack_consumption",
|
":stack_consumption",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@ cc_library(
|
||||||
],
|
],
|
||||||
hdrs = ["hash.h"],
|
hdrs = ["hash.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":city",
|
":city",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
@ -50,6 +52,7 @@ cc_library(
|
||||||
name = "hash_testing",
|
name = "hash_testing",
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["hash_testing.h"],
|
hdrs = ["hash_testing.h"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":spy_hash_state",
|
":spy_hash_state",
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
|
@ -63,6 +66,7 @@ cc_test(
|
||||||
name = "hash_test",
|
name = "hash_test",
|
||||||
srcs = ["hash_test.cc"],
|
srcs = ["hash_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":hash",
|
":hash",
|
||||||
":hash_testing",
|
":hash_testing",
|
||||||
|
@ -80,6 +84,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/spy_hash_state.h"],
|
hdrs = ["internal/spy_hash_state.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
":hash",
|
":hash",
|
||||||
|
@ -95,6 +100,7 @@ cc_library(
|
||||||
"internal/city.h",
|
"internal/city.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
@ -106,6 +112,7 @@ cc_test(
|
||||||
name = "city_test",
|
name = "city_test",
|
||||||
srcs = ["internal/city_test.cc"],
|
srcs = ["internal/city_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":city",
|
":city",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
"ABSL_EXCEPTIONS_FLAG",
|
"ABSL_EXCEPTIONS_FLAG",
|
||||||
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
||||||
|
@ -30,6 +31,7 @@ cc_library(
|
||||||
name = "memory",
|
name = "memory",
|
||||||
hdrs = ["memory.h"],
|
hdrs = ["memory.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
"//absl/meta:type_traits",
|
"//absl/meta:type_traits",
|
||||||
|
@ -40,6 +42,7 @@ cc_test(
|
||||||
name = "memory_test",
|
name = "memory_test",
|
||||||
srcs = ["memory_test.cc"],
|
srcs = ["memory_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":memory",
|
":memory",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -54,7 +57,7 @@ cc_test(
|
||||||
"memory_exception_safety_test.cc",
|
"memory_exception_safety_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":memory",
|
":memory",
|
||||||
"//absl/base:exception_safety_testing",
|
"//absl/base:exception_safety_testing",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@ cc_library(
|
||||||
name = "type_traits",
|
name = "type_traits",
|
||||||
hdrs = ["type_traits.h"],
|
hdrs = ["type_traits.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
],
|
],
|
||||||
|
@ -21,6 +23,7 @@ cc_test(
|
||||||
name = "type_traits_test",
|
name = "type_traits_test",
|
||||||
srcs = ["type_traits_test.cc"],
|
srcs = ["type_traits_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":type_traits",
|
":type_traits",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ cc_library(
|
||||||
],
|
],
|
||||||
hdrs = ["int128.h"],
|
hdrs = ["int128.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
@ -45,6 +47,7 @@ cc_test(
|
||||||
"int128_test.cc",
|
"int128_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":int128",
|
":int128",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -59,6 +62,7 @@ cc_test(
|
||||||
name = "int128_benchmark",
|
name = "int128_benchmark",
|
||||||
srcs = ["int128_benchmark.cc"],
|
srcs = ["int128_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["benchmark"],
|
tags = ["benchmark"],
|
||||||
deps = [
|
deps = [
|
||||||
":int128",
|
":int128",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ cc_library(
|
||||||
"internal/graphcycles.h",
|
"internal/graphcycles.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -72,7 +74,7 @@ cc_library(
|
||||||
linkopts = select({
|
linkopts = select({
|
||||||
"//absl:windows": [],
|
"//absl:windows": [],
|
||||||
"//conditions:default": ["-pthread"],
|
"//conditions:default": ["-pthread"],
|
||||||
}),
|
}) + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":graphcycles_internal",
|
":graphcycles_internal",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -92,9 +94,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["barrier_test.cc"],
|
srcs = ["barrier_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
tags = [
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
"no_test_wasm",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
":synchronization",
|
":synchronization",
|
||||||
"//absl/time",
|
"//absl/time",
|
||||||
|
@ -107,9 +107,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["blocking_counter_test.cc"],
|
srcs = ["blocking_counter_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
tags = [
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
"no_test_wasm",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
":synchronization",
|
":synchronization",
|
||||||
"//absl/time",
|
"//absl/time",
|
||||||
|
@ -122,6 +120,7 @@ cc_test(
|
||||||
size = "medium",
|
size = "medium",
|
||||||
srcs = ["internal/graphcycles_test.cc"],
|
srcs = ["internal/graphcycles_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":graphcycles_internal",
|
":graphcycles_internal",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -134,6 +133,7 @@ cc_test(
|
||||||
name = "graphcycles_benchmark",
|
name = "graphcycles_benchmark",
|
||||||
srcs = ["internal/graphcycles_benchmark.cc"],
|
srcs = ["internal/graphcycles_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = [
|
tags = [
|
||||||
"benchmark",
|
"benchmark",
|
||||||
],
|
],
|
||||||
|
@ -148,6 +148,7 @@ cc_library(
|
||||||
name = "thread_pool",
|
name = "thread_pool",
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
hdrs = ["internal/thread_pool.h"],
|
hdrs = ["internal/thread_pool.h"],
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl:__subpackages__",
|
"//absl:__subpackages__",
|
||||||
],
|
],
|
||||||
|
@ -162,6 +163,7 @@ cc_test(
|
||||||
size = "large",
|
size = "large",
|
||||||
srcs = ["mutex_test.cc"],
|
srcs = ["mutex_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
shard_count = 25,
|
shard_count = 25,
|
||||||
deps = [
|
deps = [
|
||||||
":synchronization",
|
":synchronization",
|
||||||
|
@ -179,6 +181,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = ["mutex_benchmark.cc"],
|
srcs = ["mutex_benchmark.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl/synchronization:__pkg__",
|
"//absl/synchronization:__pkg__",
|
||||||
],
|
],
|
||||||
|
@ -195,6 +198,7 @@ cc_binary(
|
||||||
name = "mutex_benchmark",
|
name = "mutex_benchmark",
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
":mutex_benchmark_common",
|
":mutex_benchmark_common",
|
||||||
|
@ -206,6 +210,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["notification_test.cc"],
|
srcs = ["notification_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":synchronization",
|
":synchronization",
|
||||||
"//absl/time",
|
"//absl/time",
|
||||||
|
@ -218,6 +223,7 @@ cc_library(
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = ["internal/per_thread_sem_test.cc"],
|
srcs = ["internal/per_thread_sem_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":synchronization",
|
":synchronization",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -232,7 +238,7 @@ cc_test(
|
||||||
name = "per_thread_sem_test",
|
name = "per_thread_sem_test",
|
||||||
size = "medium",
|
size = "medium",
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
tags = ["no_test_wasm"],
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":per_thread_sem_test_common",
|
":per_thread_sem_test_common",
|
||||||
":synchronization",
|
":synchronization",
|
||||||
|
@ -249,6 +255,7 @@ cc_test(
|
||||||
"lifetime_test.cc",
|
"lifetime_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["no_test_ios_x86_64"],
|
tags = ["no_test_ios_x86_64"],
|
||||||
deps = [
|
deps = [
|
||||||
":synchronization",
|
":synchronization",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ cc_library(
|
||||||
"time.h",
|
"time.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
@ -60,6 +62,7 @@ cc_library(
|
||||||
],
|
],
|
||||||
hdrs = ["internal/test_util.h"],
|
hdrs = ["internal/test_util.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = [
|
visibility = [
|
||||||
"//absl/time:__pkg__",
|
"//absl/time:__pkg__",
|
||||||
],
|
],
|
||||||
|
@ -82,6 +85,7 @@ cc_test(
|
||||||
"time_zone_test.cc",
|
"time_zone_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":test_util",
|
":test_util",
|
||||||
":time",
|
":time",
|
||||||
|
@ -103,6 +107,7 @@ cc_test(
|
||||||
"time_benchmark.cc",
|
"time_benchmark.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = [
|
tags = [
|
||||||
"benchmark",
|
"benchmark",
|
||||||
],
|
],
|
||||||
|
|
|
@ -87,7 +87,6 @@ cc_test(
|
||||||
"no_test_android_arm",
|
"no_test_android_arm",
|
||||||
"no_test_android_arm64",
|
"no_test_android_arm64",
|
||||||
"no_test_android_x86",
|
"no_test_android_x86",
|
||||||
"no_test_wasm",
|
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
":civil_time",
|
":civil_time",
|
||||||
|
@ -106,7 +105,6 @@ cc_test(
|
||||||
"no_test_android_arm",
|
"no_test_android_arm",
|
||||||
"no_test_android_arm64",
|
"no_test_android_arm64",
|
||||||
"no_test_android_x86",
|
"no_test_android_x86",
|
||||||
"no_test_wasm",
|
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
":civil_time",
|
":civil_time",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
"ABSL_EXCEPTIONS_FLAG",
|
"ABSL_EXCEPTIONS_FLAG",
|
||||||
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
|
||||||
|
@ -30,6 +31,7 @@ cc_library(
|
||||||
name = "any",
|
name = "any",
|
||||||
hdrs = ["any.h"],
|
hdrs = ["any.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":bad_any_cast",
|
":bad_any_cast",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -43,6 +45,7 @@ cc_library(
|
||||||
name = "bad_any_cast",
|
name = "bad_any_cast",
|
||||||
hdrs = ["bad_any_cast.h"],
|
hdrs = ["bad_any_cast.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":bad_any_cast_impl",
|
":bad_any_cast_impl",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -56,7 +59,7 @@ cc_library(
|
||||||
"bad_any_cast.h",
|
"bad_any_cast.h",
|
||||||
],
|
],
|
||||||
copts = ABSL_EXCEPTIONS_FLAG + ABSL_DEFAULT_COPTS,
|
copts = ABSL_EXCEPTIONS_FLAG + ABSL_DEFAULT_COPTS,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -71,7 +74,7 @@ cc_test(
|
||||||
"any_test.cc",
|
"any_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":any",
|
":any",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -89,6 +92,7 @@ cc_test(
|
||||||
"any_test.cc",
|
"any_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":any",
|
":any",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -103,7 +107,7 @@ cc_test(
|
||||||
name = "any_exception_safety_test",
|
name = "any_exception_safety_test",
|
||||||
srcs = ["any_exception_safety_test.cc"],
|
srcs = ["any_exception_safety_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":any",
|
":any",
|
||||||
"//absl/base:exception_safety_testing",
|
"//absl/base:exception_safety_testing",
|
||||||
|
@ -115,6 +119,7 @@ cc_library(
|
||||||
name = "span",
|
name = "span",
|
||||||
hdrs = ["span.h"],
|
hdrs = ["span.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/algorithm",
|
"//absl/algorithm",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
@ -128,7 +133,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["span_test.cc"],
|
srcs = ["span_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":span",
|
":span",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -147,6 +152,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["span_test.cc"],
|
srcs = ["span_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":span",
|
":span",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -162,11 +168,12 @@ cc_test(
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "optional",
|
name = "optional",
|
||||||
srcs = ["optional.cc"],
|
|
||||||
hdrs = ["optional.h"],
|
hdrs = ["optional.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":bad_optional_access",
|
":bad_optional_access",
|
||||||
|
"//absl/base:base_internal",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
"//absl/memory",
|
"//absl/memory",
|
||||||
|
@ -180,7 +187,7 @@ cc_library(
|
||||||
srcs = ["bad_optional_access.cc"],
|
srcs = ["bad_optional_access.cc"],
|
||||||
hdrs = ["bad_optional_access.h"],
|
hdrs = ["bad_optional_access.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -192,7 +199,7 @@ cc_library(
|
||||||
srcs = ["bad_variant_access.cc"],
|
srcs = ["bad_variant_access.cc"],
|
||||||
hdrs = ["bad_variant_access.h"],
|
hdrs = ["bad_variant_access.h"],
|
||||||
copts = ABSL_EXCEPTIONS_FLAG + ABSL_DEFAULT_COPTS,
|
copts = ABSL_EXCEPTIONS_FLAG + ABSL_DEFAULT_COPTS,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -206,7 +213,7 @@ cc_test(
|
||||||
"optional_test.cc",
|
"optional_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":optional",
|
":optional",
|
||||||
"//absl/base",
|
"//absl/base",
|
||||||
|
@ -223,7 +230,7 @@ cc_test(
|
||||||
"optional_exception_safety_test.cc",
|
"optional_exception_safety_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":optional",
|
":optional",
|
||||||
"//absl/base:exception_safety_testing",
|
"//absl/base:exception_safety_testing",
|
||||||
|
@ -236,6 +243,7 @@ cc_library(
|
||||||
srcs = ["internal/variant.h"],
|
srcs = ["internal/variant.h"],
|
||||||
hdrs = ["variant.h"],
|
hdrs = ["variant.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":bad_variant_access",
|
":bad_variant_access",
|
||||||
"//absl/base:base_internal",
|
"//absl/base:base_internal",
|
||||||
|
@ -251,7 +259,7 @@ cc_test(
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["variant_test.cc"],
|
srcs = ["variant_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":variant",
|
":variant",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -269,6 +277,7 @@ cc_test(
|
||||||
"variant_benchmark.cc",
|
"variant_benchmark.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
tags = ["benchmark"],
|
tags = ["benchmark"],
|
||||||
deps = [
|
deps = [
|
||||||
":variant",
|
":variant",
|
||||||
|
@ -284,7 +293,7 @@ cc_test(
|
||||||
"variant_exception_safety_test.cc",
|
"variant_exception_safety_test.cc",
|
||||||
],
|
],
|
||||||
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
|
||||||
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
|
linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":variant",
|
":variant",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
|
|
@ -172,12 +172,11 @@ absl_cc_library(
|
||||||
optional
|
optional
|
||||||
HDRS
|
HDRS
|
||||||
"optional.h"
|
"optional.h"
|
||||||
SRCS
|
|
||||||
"optional.cc"
|
|
||||||
COPTS
|
COPTS
|
||||||
${ABSL_DEFAULT_COPTS}
|
${ABSL_DEFAULT_COPTS}
|
||||||
DEPS
|
DEPS
|
||||||
absl::bad_optional_access
|
absl::bad_optional_access
|
||||||
|
absl::base_internal
|
||||||
absl::config
|
absl::config
|
||||||
absl::core_headers
|
absl::core_headers
|
||||||
absl::memory
|
absl::memory
|
||||||
|
@ -297,7 +296,8 @@ absl_cc_test(
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(cohenjon,zhangxy) Figure out why this test is failing on gcc 4.8
|
# TODO(cohenjon,zhangxy) Figure out why this test is failing on gcc 4.8
|
||||||
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9)
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
||||||
|
else()
|
||||||
absl_cc_test(
|
absl_cc_test(
|
||||||
NAME
|
NAME
|
||||||
variant_exception_safety_test
|
variant_exception_safety_test
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
// Copyright 2017 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.
|
|
||||||
|
|
||||||
#include "absl/types/optional.h"
|
|
||||||
|
|
||||||
#ifndef ABSL_HAVE_STD_OPTIONAL
|
|
||||||
namespace absl {
|
|
||||||
|
|
||||||
nullopt_t::init_t nullopt_t::init;
|
|
||||||
extern const nullopt_t nullopt{nullopt_t::init};
|
|
||||||
|
|
||||||
} // namespace absl
|
|
||||||
#endif // ABSL_HAVE_STD_OPTIONAL
|
|
|
@ -61,6 +61,7 @@ using std::nullopt;
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "absl/base/attributes.h"
|
#include "absl/base/attributes.h"
|
||||||
|
#include "absl/base/internal/inline_variable.h"
|
||||||
#include "absl/meta/type_traits.h"
|
#include "absl/meta/type_traits.h"
|
||||||
#include "absl/types/bad_optional_access.h"
|
#include "absl/types/bad_optional_access.h"
|
||||||
|
|
||||||
|
@ -126,32 +127,30 @@ namespace absl {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class optional;
|
class optional;
|
||||||
|
|
||||||
|
namespace optional_internal {
|
||||||
|
|
||||||
|
// This tag type is used as a constructor parameter type for `nullopt_t`.
|
||||||
|
struct init_t {
|
||||||
|
explicit init_t() = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace optional_internal
|
||||||
|
|
||||||
// nullopt_t
|
// nullopt_t
|
||||||
//
|
//
|
||||||
// Class type for `absl::nullopt` used to indicate an `absl::optional<T>` type
|
// Class type for `absl::nullopt` used to indicate an `absl::optional<T>` type
|
||||||
// that does not contain a value.
|
// that does not contain a value.
|
||||||
struct nullopt_t {
|
struct nullopt_t {
|
||||||
struct init_t {};
|
|
||||||
static init_t init;
|
|
||||||
|
|
||||||
// It must not be default-constructible to avoid ambiguity for opt = {}.
|
// It must not be default-constructible to avoid ambiguity for opt = {}.
|
||||||
// Note the non-const reference, which is to eliminate ambiguity for code
|
explicit constexpr nullopt_t(optional_internal::init_t) noexcept {}
|
||||||
// like:
|
|
||||||
//
|
|
||||||
// struct S { int value; };
|
|
||||||
//
|
|
||||||
// void Test() {
|
|
||||||
// optional<S> opt;
|
|
||||||
// opt = {{}};
|
|
||||||
// }
|
|
||||||
explicit constexpr nullopt_t(init_t& /*unused*/) {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// nullopt
|
// nullopt
|
||||||
//
|
//
|
||||||
// A tag constant of type `absl::nullopt_t` used to indicate an empty
|
// A tag constant of type `absl::nullopt_t` used to indicate an empty
|
||||||
// `absl::optional` in certain functions, such as construction or assignment.
|
// `absl::optional` in certain functions, such as construction or assignment.
|
||||||
extern const nullopt_t nullopt;
|
ABSL_INTERNAL_INLINE_CONSTEXPR(nullopt_t, nullopt,
|
||||||
|
nullopt_t(optional_internal::init_t()));
|
||||||
|
|
||||||
namespace optional_internal {
|
namespace optional_internal {
|
||||||
|
|
||||||
|
|
|
@ -179,15 +179,7 @@ TEST(optionalTest, DefaultConstructor) {
|
||||||
TEST(optionalTest, nulloptConstructor) {
|
TEST(optionalTest, nulloptConstructor) {
|
||||||
absl::optional<int> empty(absl::nullopt);
|
absl::optional<int> empty(absl::nullopt);
|
||||||
EXPECT_FALSE(empty);
|
EXPECT_FALSE(empty);
|
||||||
|
|
||||||
#ifdef ABSL_HAVE_STD_OPTIONAL
|
|
||||||
constexpr absl::optional<int> cempty{absl::nullopt};
|
constexpr absl::optional<int> cempty{absl::nullopt};
|
||||||
#else
|
|
||||||
// Creating a temporary absl::nullopt_t object instead of using absl::nullopt
|
|
||||||
// because absl::nullopt cannot be constexpr and have external linkage at the
|
|
||||||
// same time.
|
|
||||||
constexpr absl::optional<int> cempty{absl::nullopt_t(absl::nullopt_t::init)};
|
|
||||||
#endif
|
|
||||||
static_assert(!cempty.has_value(), "");
|
static_assert(!cempty.has_value(), "");
|
||||||
EXPECT_TRUE((std::is_nothrow_constructible<absl::optional<int>,
|
EXPECT_TRUE((std::is_nothrow_constructible<absl::optional<int>,
|
||||||
absl::nullopt_t>::value));
|
absl::nullopt_t>::value));
|
||||||
|
|
|
@ -73,9 +73,6 @@
|
||||||
|
|
||||||
namespace absl {
|
namespace absl {
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
class Span;
|
|
||||||
|
|
||||||
namespace span_internal {
|
namespace span_internal {
|
||||||
// A constexpr min function
|
// A constexpr min function
|
||||||
constexpr size_t Min(size_t a, size_t b) noexcept { return a < b ? a : b; }
|
constexpr size_t Min(size_t a, size_t b) noexcept { return a < b ? a : b; }
|
||||||
|
@ -133,14 +130,16 @@ template <typename T>
|
||||||
using EnableIfMutable =
|
using EnableIfMutable =
|
||||||
typename std::enable_if<!std::is_const<T>::value, int>::type;
|
typename std::enable_if<!std::is_const<T>::value, int>::type;
|
||||||
|
|
||||||
template <typename T>
|
template <template <typename> class SpanT, typename T>
|
||||||
bool EqualImpl(Span<T> a, Span<T> b) {
|
bool EqualImpl(SpanT<T> a, SpanT<T> b) {
|
||||||
static_assert(std::is_const<T>::value, "");
|
static_assert(std::is_const<T>::value, "");
|
||||||
return absl::equal(a.begin(), a.end(), b.begin(), b.end());
|
return absl::equal(a.begin(), a.end(), b.begin(), b.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <template <typename> class SpanT, typename T>
|
||||||
bool LessThanImpl(Span<T> a, Span<T> b) {
|
bool LessThanImpl(SpanT<T> a, SpanT<T> b) {
|
||||||
|
// We can't use value_type since that is remove_cv_t<T>, so we go the long way
|
||||||
|
// around.
|
||||||
static_assert(std::is_const<T>::value, "");
|
static_assert(std::is_const<T>::value, "");
|
||||||
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end());
|
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end());
|
||||||
}
|
}
|
||||||
|
@ -165,8 +164,8 @@ struct IsConvertible : IsConvertibleHelper<From, To>::type {};
|
||||||
// TODO(zhangxy): replace `IsConvertible` with `std::is_convertible` once the
|
// TODO(zhangxy): replace `IsConvertible` with `std::is_convertible` once the
|
||||||
// older version of libcxx is not supported.
|
// older version of libcxx is not supported.
|
||||||
template <typename From, typename To>
|
template <typename From, typename To>
|
||||||
using EnableIfConvertibleToSpanConst =
|
using EnableIfConvertibleTo =
|
||||||
typename std::enable_if<IsConvertible<From, Span<const To>>::value>::type;
|
typename std::enable_if<IsConvertible<From, To>::value>::type;
|
||||||
} // namespace span_internal
|
} // namespace span_internal
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -551,25 +550,27 @@ const typename Span<T>::size_type Span<T>::npos;
|
||||||
// operator==
|
// operator==
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool operator==(Span<T> a, Span<T> b) {
|
bool operator==(Span<T> a, Span<T> b) {
|
||||||
return span_internal::EqualImpl<const T>(a, b);
|
return span_internal::EqualImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool operator==(Span<const T> a, Span<T> b) {
|
bool operator==(Span<const T> a, Span<T> b) {
|
||||||
return span_internal::EqualImpl<const T>(a, b);
|
return span_internal::EqualImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool operator==(Span<T> a, Span<const T> b) {
|
bool operator==(Span<T> a, Span<const T> b) {
|
||||||
return span_internal::EqualImpl<const T>(a, b);
|
return span_internal::EqualImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator==(const U& a, Span<T> b) {
|
bool operator==(const U& a, Span<T> b) {
|
||||||
return span_internal::EqualImpl<const T>(a, b);
|
return span_internal::EqualImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator==(Span<T> a, const U& b) {
|
bool operator==(Span<T> a, const U& b) {
|
||||||
return span_internal::EqualImpl<const T>(a, b);
|
return span_internal::EqualImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// operator!=
|
// operator!=
|
||||||
|
@ -585,13 +586,15 @@ template <typename T>
|
||||||
bool operator!=(Span<T> a, Span<const T> b) {
|
bool operator!=(Span<T> a, Span<const T> b) {
|
||||||
return !(a == b);
|
return !(a == b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator!=(const U& a, Span<T> b) {
|
bool operator!=(const U& a, Span<T> b) {
|
||||||
return !(a == b);
|
return !(a == b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator!=(Span<T> a, const U& b) {
|
bool operator!=(Span<T> a, const U& b) {
|
||||||
return !(a == b);
|
return !(a == b);
|
||||||
}
|
}
|
||||||
|
@ -599,25 +602,27 @@ bool operator!=(Span<T> a, const U& b) {
|
||||||
// operator<
|
// operator<
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool operator<(Span<T> a, Span<T> b) {
|
bool operator<(Span<T> a, Span<T> b) {
|
||||||
return span_internal::LessThanImpl<const T>(a, b);
|
return span_internal::LessThanImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool operator<(Span<const T> a, Span<T> b) {
|
bool operator<(Span<const T> a, Span<T> b) {
|
||||||
return span_internal::LessThanImpl<const T>(a, b);
|
return span_internal::LessThanImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool operator<(Span<T> a, Span<const T> b) {
|
bool operator<(Span<T> a, Span<const T> b) {
|
||||||
return span_internal::LessThanImpl<const T>(a, b);
|
return span_internal::LessThanImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator<(const U& a, Span<T> b) {
|
bool operator<(const U& a, Span<T> b) {
|
||||||
return span_internal::LessThanImpl<const T>(a, b);
|
return span_internal::LessThanImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator<(Span<T> a, const U& b) {
|
bool operator<(Span<T> a, const U& b) {
|
||||||
return span_internal::LessThanImpl<const T>(a, b);
|
return span_internal::LessThanImpl<Span, const T>(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// operator>
|
// operator>
|
||||||
|
@ -633,13 +638,15 @@ template <typename T>
|
||||||
bool operator>(Span<T> a, Span<const T> b) {
|
bool operator>(Span<T> a, Span<const T> b) {
|
||||||
return b < a;
|
return b < a;
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator>(const U& a, Span<T> b) {
|
bool operator>(const U& a, Span<T> b) {
|
||||||
return b < a;
|
return b < a;
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator>(Span<T> a, const U& b) {
|
bool operator>(Span<T> a, const U& b) {
|
||||||
return b < a;
|
return b < a;
|
||||||
}
|
}
|
||||||
|
@ -657,13 +664,15 @@ template <typename T>
|
||||||
bool operator<=(Span<T> a, Span<const T> b) {
|
bool operator<=(Span<T> a, Span<const T> b) {
|
||||||
return !(b < a);
|
return !(b < a);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator<=(const U& a, Span<T> b) {
|
bool operator<=(const U& a, Span<T> b) {
|
||||||
return !(b < a);
|
return !(b < a);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator<=(Span<T> a, const U& b) {
|
bool operator<=(Span<T> a, const U& b) {
|
||||||
return !(b < a);
|
return !(b < a);
|
||||||
}
|
}
|
||||||
|
@ -681,13 +690,15 @@ template <typename T>
|
||||||
bool operator>=(Span<T> a, Span<const T> b) {
|
bool operator>=(Span<T> a, Span<const T> b) {
|
||||||
return !(a < b);
|
return !(a < b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator>=(const U& a, Span<T> b) {
|
bool operator>=(const U& a, Span<T> b) {
|
||||||
return !(a < b);
|
return !(a < b);
|
||||||
}
|
}
|
||||||
template <typename T, typename U,
|
template <
|
||||||
typename = span_internal::EnableIfConvertibleToSpanConst<U, T>>
|
typename T, typename U,
|
||||||
|
typename = span_internal::EnableIfConvertibleTo<U, absl::Span<const T>>>
|
||||||
bool operator>=(Span<T> a, const U& b) {
|
bool operator>=(Span<T> a, const U& b) {
|
||||||
return !(a < b);
|
return !(a < b);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
load(
|
load(
|
||||||
"//absl:copts/configure_copts.bzl",
|
"//absl:copts/configure_copts.bzl",
|
||||||
"ABSL_DEFAULT_COPTS",
|
"ABSL_DEFAULT_COPTS",
|
||||||
|
"ABSL_DEFAULT_LINKOPTS",
|
||||||
"ABSL_TEST_COPTS",
|
"ABSL_TEST_COPTS",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@ cc_library(
|
||||||
name = "utility",
|
name = "utility",
|
||||||
hdrs = ["utility.h"],
|
hdrs = ["utility.h"],
|
||||||
copts = ABSL_DEFAULT_COPTS,
|
copts = ABSL_DEFAULT_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//absl/base:base_internal",
|
"//absl/base:base_internal",
|
||||||
"//absl/base:config",
|
"//absl/base:config",
|
||||||
|
@ -23,6 +25,7 @@ cc_test(
|
||||||
name = "utility_test",
|
name = "utility_test",
|
||||||
srcs = ["utility_test.cc"],
|
srcs = ["utility_test.cc"],
|
||||||
copts = ABSL_TEST_COPTS,
|
copts = ABSL_TEST_COPTS,
|
||||||
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||||
deps = [
|
deps = [
|
||||||
":utility",
|
":utility",
|
||||||
"//absl/base:core_headers",
|
"//absl/base:core_headers",
|
||||||
|
|
|
@ -29,5 +29,5 @@ time docker run \
|
||||||
-e CFLAGS="-Werror" \
|
-e CFLAGS="-Werror" \
|
||||||
-e CXXFLAGS="-Werror" \
|
-e CXXFLAGS="-Werror" \
|
||||||
gcr.io/google.com/absl-177019/linux_gcc-4.8:20190316 \
|
gcr.io/google.com/absl-177019/linux_gcc-4.8:20190316 \
|
||||||
/bin/bash CMake/install_test_project/test.sh
|
/bin/bash CMake/install_test_project/test.sh $@
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,20 @@ if [ -z ${COMPILATION_MODE:-} ]; then
|
||||||
COMPILATION_MODE="fastbuild opt"
|
COMPILATION_MODE="fastbuild opt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190313"
|
||||||
|
|
||||||
|
# USE_BAZEL_CACHE=1 only works on Kokoro.
|
||||||
|
# Without access to the credentials this won't work.
|
||||||
|
if [ ${USE_BAZEL_CACHE:-0} -ne 0 ]; then
|
||||||
|
DOCKER_EXTRA_ARGS="--volume=${KOKORO_KEYSTORE_DIR}:/keystore:ro ${DOCKER_EXTRA_ARGS:-}"
|
||||||
|
# Bazel doesn't track changes to tools outside of the workspace
|
||||||
|
# (e.g. /usr/bin/gcc), so by appending the docker container to the
|
||||||
|
# remote_http_cache url, we make changes to the container part of
|
||||||
|
# the cache key. Hashing the key is to make it shorter and url-safe.
|
||||||
|
container_key=$(echo ${DOCKER_CONTAINER} | sha256sum | head -c 16)
|
||||||
|
BAZEL_EXTRA_ARGS="--remote_http_cache=https://storage.googleapis.com/absl-bazel-remote-cache/${container_key} --google_credentials=/keystore/73103_absl-bazel-remote-cache ${BAZEL_EXTRA_ARGS:-}"
|
||||||
|
fi
|
||||||
|
|
||||||
for std in ${STD}; do
|
for std in ${STD}; do
|
||||||
for compilation_mode in ${COMPILATION_MODE}; do
|
for compilation_mode in ${COMPILATION_MODE}; do
|
||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
|
@ -47,7 +61,8 @@ for std in ${STD}; do
|
||||||
-e BAZEL_CXXOPTS="-std=${std}:-nostdinc++" \
|
-e BAZEL_CXXOPTS="-std=${std}:-nostdinc++" \
|
||||||
-e BAZEL_LINKOPTS="-L/opt/llvm/libcxx/lib:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx/lib" \
|
-e BAZEL_LINKOPTS="-L/opt/llvm/libcxx/lib:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx/lib" \
|
||||||
-e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx/include/c++/v1" \
|
-e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx/include/c++/v1" \
|
||||||
gcr.io/google.com/absl-177019/linux_clang-latest:20190313 \
|
${DOCKER_EXTRA_ARGS:-} \
|
||||||
|
${DOCKER_CONTAINER} \
|
||||||
/usr/local/bin/bazel test ... \
|
/usr/local/bin/bazel test ... \
|
||||||
--compilation_mode=${compilation_mode} \
|
--compilation_mode=${compilation_mode} \
|
||||||
--copt=-Werror \
|
--copt=-Werror \
|
||||||
|
@ -57,6 +72,7 @@ for std in ${STD}; do
|
||||||
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" \
|
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" \
|
||||||
--test_env="TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo" \
|
--test_env="TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo" \
|
||||||
--test_output=errors \
|
--test_output=errors \
|
||||||
--test_tag_filters=-benchmark
|
--test_tag_filters=-benchmark \
|
||||||
|
${BAZEL_EXTRA_ARGS:-}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
|
@ -32,6 +32,20 @@ if [ -z ${COMPILATION_MODE:-} ]; then
|
||||||
COMPILATION_MODE="fastbuild opt"
|
COMPILATION_MODE="fastbuild opt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190313"
|
||||||
|
|
||||||
|
# USE_BAZEL_CACHE=1 only works on Kokoro.
|
||||||
|
# Without access to the credentials this won't work.
|
||||||
|
if [ ${USE_BAZEL_CACHE:-0} -ne 0 ]; then
|
||||||
|
DOCKER_EXTRA_ARGS="--volume=${KOKORO_KEYSTORE_DIR}:/keystore:ro ${DOCKER_EXTRA_ARGS:-}"
|
||||||
|
# Bazel doesn't track changes to tools outside of the workspace
|
||||||
|
# (e.g. /usr/bin/gcc), so by appending the docker container to the
|
||||||
|
# remote_http_cache url, we make changes to the container part of
|
||||||
|
# the cache key. Hashing the key is to make it shorter and url-safe.
|
||||||
|
container_key=$(echo ${DOCKER_CONTAINER} | sha256sum | head -c 16)
|
||||||
|
BAZEL_EXTRA_ARGS="--remote_http_cache=https://storage.googleapis.com/absl-bazel-remote-cache/${container_key} --google_credentials=/keystore/73103_absl-bazel-remote-cache ${BAZEL_EXTRA_ARGS:-}"
|
||||||
|
fi
|
||||||
|
|
||||||
for std in ${STD}; do
|
for std in ${STD}; do
|
||||||
for compilation_mode in ${COMPILATION_MODE}; do
|
for compilation_mode in ${COMPILATION_MODE}; do
|
||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
|
@ -46,7 +60,8 @@ for std in ${STD}; do
|
||||||
-e BAZEL_COMPILER="llvm" \
|
-e BAZEL_COMPILER="llvm" \
|
||||||
-e BAZEL_CXXOPTS="-std=${std}" \
|
-e BAZEL_CXXOPTS="-std=${std}" \
|
||||||
-e CPLUS_INCLUDE_PATH="/usr/include/c++/6" \
|
-e CPLUS_INCLUDE_PATH="/usr/include/c++/6" \
|
||||||
gcr.io/google.com/absl-177019/linux_clang-latest:20190313 \
|
${DOCKER_EXTRA_ARGS:-} \
|
||||||
|
${DOCKER_CONTAINER} \
|
||||||
/usr/local/bin/bazel test ... \
|
/usr/local/bin/bazel test ... \
|
||||||
--compilation_mode=${compilation_mode} \
|
--compilation_mode=${compilation_mode} \
|
||||||
--copt=-Werror \
|
--copt=-Werror \
|
||||||
|
@ -56,6 +71,7 @@ for std in ${STD}; do
|
||||||
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" \
|
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" \
|
||||||
--test_env="TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo" \
|
--test_env="TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo" \
|
||||||
--test_output=errors \
|
--test_output=errors \
|
||||||
--test_tag_filters=-benchmark
|
--test_tag_filters=-benchmark \
|
||||||
|
${BAZEL_EXTRA_ARGS:-}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
|
@ -32,6 +32,20 @@ if [ -z ${COMPILATION_MODE:-} ]; then
|
||||||
COMPILATION_MODE="fastbuild opt"
|
COMPILATION_MODE="fastbuild opt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-latest:20190318"
|
||||||
|
|
||||||
|
# USE_BAZEL_CACHE=1 only works on Kokoro.
|
||||||
|
# Without access to the credentials this won't work.
|
||||||
|
if [ ${USE_BAZEL_CACHE:-0} -ne 0 ]; then
|
||||||
|
DOCKER_EXTRA_ARGS="--volume=${KOKORO_KEYSTORE_DIR}:/keystore:ro ${DOCKER_EXTRA_ARGS:-}"
|
||||||
|
# Bazel doesn't track changes to tools outside of the workspace
|
||||||
|
# (e.g. /usr/bin/gcc), so by appending the docker container to the
|
||||||
|
# remote_http_cache url, we make changes to the container part of
|
||||||
|
# the cache key. Hashing the key is to make it shorter and url-safe.
|
||||||
|
container_key=$(echo ${DOCKER_CONTAINER} | sha256sum | head -c 16)
|
||||||
|
BAZEL_EXTRA_ARGS="--remote_http_cache=https://storage.googleapis.com/absl-bazel-remote-cache/${container_key} --google_credentials=/keystore/73103_absl-bazel-remote-cache ${BAZEL_EXTRA_ARGS:-}"
|
||||||
|
fi
|
||||||
|
|
||||||
for std in ${STD}; do
|
for std in ${STD}; do
|
||||||
for compilation_mode in ${COMPILATION_MODE}; do
|
for compilation_mode in ${COMPILATION_MODE}; do
|
||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
|
@ -44,7 +58,8 @@ for std in ${STD}; do
|
||||||
--rm \
|
--rm \
|
||||||
-e CC="/usr/local/bin/gcc" \
|
-e CC="/usr/local/bin/gcc" \
|
||||||
-e BAZEL_CXXOPTS="-std=${std}" \
|
-e BAZEL_CXXOPTS="-std=${std}" \
|
||||||
gcr.io/google.com/absl-177019/linux_gcc-latest:20190318 \
|
${DOCKER_EXTRA_ARGS:-} \
|
||||||
|
${DOCKER_CONTAINER} \
|
||||||
/usr/local/bin/bazel test ... \
|
/usr/local/bin/bazel test ... \
|
||||||
--compilation_mode=${compilation_mode} \
|
--compilation_mode=${compilation_mode} \
|
||||||
--copt=-Werror \
|
--copt=-Werror \
|
||||||
|
@ -54,6 +69,7 @@ for std in ${STD}; do
|
||||||
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" \
|
--test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" \
|
||||||
--test_env="TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo" \
|
--test_env="TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo" \
|
||||||
--test_output=errors \
|
--test_output=errors \
|
||||||
--test_tag_filters=-benchmark
|
--test_tag_filters=-benchmark \
|
||||||
|
${BAZEL_EXTRA_ARGS:-}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue