Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abseil-cpp: Expose more missing headers #1864

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"absl_variant"
],
"versions": [
"20240722.0-3",
"20240722.0-2",
"20240722.0-1",
"20230802.1-2",
Expand Down
17 changes: 17 additions & 0 deletions subprojects/packagefiles/abseil-cpp/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,26 @@ cpp = meson.get_compiler('cpp')
flags = cpp.get_supported_arguments('/DNOMINMAX', '-Wno-sign-compare', '-Wno-gcc-compat')
add_project_arguments(flags, language: 'cpp')

arch_cpp_flags = []
hw_cpp_flags = []
if host_machine.cpu_family() == 'x86_64'
hw_cpp_flags += ['-maes', '-msse4.1']
elif host_machine.cpu_family() == 'aarch64' and cpp.sizeof('void*') == 8
hw_cpp_flags += ['-march=armv8-a+crypto']
elif host_machine.cpu_family() == 'arm' and cpp.sizeof('void*') == 4
hw_cpp_flags += ['-mfpu=neon']
elif host_machine.cpu_family() == 'ppc' or host_machine.cpu_family() == 'ppc64'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif host_machine.cpu_family().startswith('ppc') or elif host_machine.cpu_family() in ['ppc', 'ppc64']
For future reference.

# This will work with glibc but not musl
timebase_check = '''#include <sys/platform/ppc.h>
int main() {
__ppc_get_timebase_freq();
return 0;
}'''
if not cpp.compiles(timebase_check)
arch_cpp_flags += ['-DABSL_USE_UNSCALED_CYCLECLOCK=0']
endif
endif
arch_flags = cpp.get_supported_arguments(arch_cpp_flags)
hw_flags = cpp.get_supported_arguments(hw_cpp_flags)

libatomic = dependency('', required: false)
Expand Down Expand Up @@ -71,6 +83,7 @@ absl_base_headers = files(
'absl/base/internal/invoke.h',
'absl/base/internal/low_level_alloc.h',
'absl/base/internal/low_level_scheduling.h',
'absl/base/internal/nullability_impl.h',
'absl/base/internal/per_thread_tls.h',
'absl/base/internal/poison.h',
'absl/base/internal/pretty_function.h',
Expand Down Expand Up @@ -100,6 +113,8 @@ absl_base_headers = files(
'absl/base/policy_checks.h',
'absl/base/port.h',
'absl/base/thread_annotations.h',
'absl/functional/any_invocable.h',
'absl/functional/internal/any_invocable.h',
'absl/memory/memory.h',
'absl/meta/type_traits.h',
'absl/utility/utility.h',
Expand Down Expand Up @@ -476,6 +491,7 @@ absl_strings_headers = files(
'absl/strings/cord_test_helpers.h',
'absl/strings/cordz_test_helpers.h',
'absl/strings/escaping.h',
'absl/strings/has_absl_stringify.h',
'absl/strings/internal/charconv_bigint.h',
'absl/strings/internal/charconv_parse.h',
'absl/strings/internal/cord_data_edge.h',
Expand Down Expand Up @@ -619,6 +635,7 @@ absl_base_lib = static_library(
'absl_base',
absl_base_sources,
include_directories: absl_include_dir,
cpp_args: arch_flags,
dependencies: [dependency('threads'), libatomic],
)

Expand Down
Loading