Skip to content

Commit

Permalink
abseil-cpp: update to 20230802.0
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Sep 17, 2023
1 parent 31dc2bb commit bcb7fc5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 44 deletions.
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"absl_time_zone"
],
"versions": [
"20230802.0-1",
"20230125.1-4",
"20230125.1-3",
"20230125.1-2",
Expand Down
8 changes: 4 additions & 4 deletions subprojects/abseil-cpp.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[wrap-file]
directory = abseil-cpp-20230125.1
source_url = https://github.com/abseil/abseil-cpp/archive/20230125.1.tar.gz
source_filename = abseil-cpp-20230125.1.tar.gz
source_hash = 81311c17599b3712069ded20cca09a62ab0bf2a89dfa16993786c8782b7ed145
directory = abseil-cpp-20230802.0
source_url = https://github.com/abseil/abseil-cpp/archive/20230802.0.tar.gz
source_filename = abseil-cpp-20230802.0.tar.gz
source_hash = 59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5
patch_directory = abseil-cpp

[provide]
Expand Down
67 changes: 27 additions & 40 deletions subprojects/packagefiles/abseil-cpp/meson.build
Original file line number Diff line number Diff line change
@@ -1,50 +1,30 @@
project('abseil-cpp', 'cpp',
version : '20230125.1',
license : 'Apache-2.0',
default_options : [
project(
'abseil-cpp',
'cpp',
version: '20230802.0',
license: 'Apache-2.0',
default_options: [
'cpp_std=c++14',
])
],
)

cpp = meson.get_compiler('cpp')

cpp_flags = [
'-Wno-sign-compare'
]

flags = cpp.get_supported_arguments(cpp_flags)

if cpp.get_argument_syntax() == 'msvc'
flags += ['/DNOMINMAX'] # Don't define min and max macros (windows.h)
endif

if cpp.get_id() == 'clang'
flags += ['-Wno-gcc-compat']
endif
flags = cpp.get_supported_arguments('/DNOMINMAX', '-Wno-sign-compare', '-Wno-gcc-compat')
add_project_arguments(flags, language: 'cpp')

hw_cpp_flags = []
if host_machine.cpu_family() == 'x86_64'
hw_cpp_flags += [ '-maes', '-msse4.1' ]
hw_cpp_flags += ['-maes', '-msse4.1']
elif host_machine.cpu_family() == 'aarch64' and cpp.sizeof('void*') == 8
hw_cpp_flags += [ '-march=armv8-a+crypto' ]
hw_cpp_flags += ['-march=armv8-a+crypto']
elif host_machine.cpu_family() == 'arm' and cpp.sizeof('void*') == 4
hw_cpp_flags += [ '-mfpu=neon' ]
hw_cpp_flags += ['-mfpu=neon']
endif
hw_flags = cpp.get_supported_arguments(hw_cpp_flags)

add_project_arguments(flags, language: 'cpp')

libatomic = dependency('', required: false)
if cpp.get_id() == 'msvc'
# VS does not not need args for atomic ops.
elif not cpp.links('''#include <stdint.h>
int main() {
struct {
uint64_t *v;
} x;
return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
(int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
}''',
name : 'GCC atomic builtins')
if not cpp.links('int main(){__sync_synchronize();}', name: 'atomic builtins')
libatomic = cpp.find_library('atomic')
endif

Expand Down Expand Up @@ -118,10 +98,10 @@ absl_base_headers = files(
'absl/base/policy_checks.h',
'absl/base/port.h',
'absl/base/thread_annotations.h',
# Dependent headers of absl_base
'absl/memory/memory.h',
'absl/meta/type_traits.h',
'absl/utility/utility.h',
'absl/memory/memory.h',
# Dependent headers of absl_base
)

absl_container_sources = files(
Expand Down Expand Up @@ -275,6 +255,7 @@ absl_hash_sources = files(
'absl/hash/internal/city.cc',
'absl/hash/internal/hash.cc',
'absl/hash/internal/low_level_hash.cc',
'absl/hash/internal/print_hash_of.cc',
)
absl_hash_headers = files(
'absl/hash/hash.h',
Expand All @@ -300,12 +281,12 @@ absl_log_sources = files(
'absl/log/internal/proto.cc',
'absl/log/log_entry.cc',
'absl/log/log_sink.cc',
'absl/log/scoped_mock_log.cc',
)
absl_log_headers = files(
'absl/log/absl_check.h',
'absl/log/absl_log.h',
'absl/log/check.h',
'absl/log/check_test_impl.h',
'absl/log/die_if_null.h',
'absl/log/flags.h',
'absl/log/globals.h',
Expand All @@ -331,7 +312,6 @@ absl_log_headers = files(
'absl/log/internal/test_matchers.h',
'absl/log/internal/voidify.h',
'absl/log/log.h',
'absl/log/log_basic_test_impl.h',
'absl/log/log_entry.h',
'absl/log/log_sink.h',
'absl/log/log_sink_registry.h',
Expand Down Expand Up @@ -366,6 +346,7 @@ absl_random_sources = files(
'absl/random/discrete_distribution.cc',
'absl/random/gaussian_distribution.cc',
'absl/random/internal/chi_square.cc',
'absl/random/internal/gaussian_distribution_gentables.cc',
'absl/random/internal/pool_urbg.cc',
'absl/random/internal/randen.cc',
'absl/random/internal/randen_detect.cc',
Expand Down Expand Up @@ -546,9 +527,15 @@ absl_synchronization_sources = files(
'absl/synchronization/barrier.cc',
'absl/synchronization/blocking_counter.cc',
'absl/synchronization/internal/create_thread_identity.cc',
'absl/synchronization/internal/futex_waiter.cc',
'absl/synchronization/internal/graphcycles.cc',
'absl/synchronization/internal/kernel_timeout.cc',
'absl/synchronization/internal/per_thread_sem.cc',
'absl/synchronization/internal/waiter.cc',
'absl/synchronization/internal/pthread_waiter.cc',
'absl/synchronization/internal/sem_waiter.cc',
'absl/synchronization/internal/stdcpp_waiter.cc',
'absl/synchronization/internal/waiter_base.cc',
'absl/synchronization/internal/win32_waiter.cc',
'absl/synchronization/mutex.cc',
'absl/synchronization/notification.cc',
)
Expand Down Expand Up @@ -709,7 +696,7 @@ absl_time_lib = static_library(
absl_strings_lib,
],
# macOS only, upstream: https://github.com/abseil/abseil-cpp/pull/280
dependencies : [dependency('CoreFoundation', required : false)],
dependencies: dependency('appleframeworks', modules: 'CoreFoundation', required: false),
)

absl_types_lib = static_library(
Expand Down

0 comments on commit bcb7fc5

Please sign in to comment.