Skip to content
Open
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 @@ -277,6 +277,7 @@
"aws-c-common"
],
"versions": [
"0.12.6-1",
"0.12.4-3",
"0.12.4-2",
"0.12.4-1"
Expand Down
8 changes: 4 additions & 4 deletions subprojects/aws-c-common.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[wrap-file]
directory = aws-c-common-0.12.4
source_url = https://github.com/awslabs/aws-c-common/archive/refs/tags/v0.12.4.tar.gz
source_filename = aws-c-common-0.12.4.tar.gz
source_hash = 0b7705a4d115663c3f485d353a75ed86e37583157585e5825d851af634b57fe3
directory = aws-c-common-0.12.6
source_url = https://github.com/awslabs/aws-c-common/archive/refs/tags/v0.12.6.tar.gz
source_filename = aws-c-common-0.12.6.tar.gz
source_hash = 138822ecdcaff1d702f37d4751f245847d088592724921cc6bf61c232b198d6b
patch_directory = aws-c-common

[provide]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cfg_data.set(
gcc_inline_asm = '''
int main() {
int foo = 42, bar = 24;
__asm__ __volatile__(\"\":\"=r\"(foo):\"r\"(bar):\"memory\");
__asm__ __volatile__("":"=r"(foo):"r"(bar):"memory");
}
'''

Expand Down Expand Up @@ -108,6 +108,7 @@ cfg_data.set(
cc.links(
avx2_intrinsics,
name: 'avx2_intrinsics',
args: cc.get_supported_arguments('/arch:AVX2', '-mavx2'),
),
)

Expand All @@ -125,6 +126,7 @@ cfg_data.set(
cc.links(
avx512_intrinsics,
name: 'avx512_intrinsics',
args: cc.get_supported_arguments('/arch:AVX512', '-mavx512f'),
),
)

Expand All @@ -144,6 +146,7 @@ cfg_data.set(
cc.links(
mm256_extract_epi64,
name: 'mm256_extract_epi64',
args: cc.get_supported_arguments('/arch:AVX', '-mavx'),
),
)

Expand All @@ -164,6 +167,7 @@ cfg_data.set(
cc.links(
clmul,
name: 'clmul',
args: cc.get_supported_arguments('-mpclmul'),
),
)

Expand Down Expand Up @@ -201,7 +205,8 @@ cfg_data.set(
)

cfg_data.set('AWS_ARCH_INTEL', host_machine.cpu_family() in ['x86', 'x86_64'])
cfg_data.set('AWS_ARCH_INTEL64', host_machine.cpu_family() == 'x86_64')
cfg_data.set('AWS_ARCH_INTEL_X64', host_machine.cpu_family() == 'x86_64')
cfg_data.set('AWS_USE_CPU_EXTENSIONS', host_machine.system() != 'cygwin')

cfg_data.set('AWS_ARCH_ARM64', host_machine.cpu_family() == 'aarch64')

Expand Down
33 changes: 28 additions & 5 deletions subprojects/packagefiles/aws-c-common/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
project(
'aws-c-common',
'c',
version: '0.12.4',
version: '0.12.6',
meson_version: '>=0.63.0',

Check notice on line 5 in subprojects/packagefiles/aws-c-common/meson.build

View workflow job for this annotation

GitHub Actions / Ubuntu (x86_64)

Minimum Meson version is 0.63.0

0.56.0: oldest version supported by WrapDB 0.57.0: fs.read 0.59.0: feature_option.disable_auto_if() 0.63.0: preserve_path arg in install_headers
license: 'Apache-2.0',
default_options: ['warning_level=3'],
)
Expand All @@ -18,6 +18,11 @@
'm',
required: false,
)
# linking to dl is required on Amazon Linux 2
dl = cc.find_library(
'dl',
required: false,
)
bcrypt = cc.find_library(
'bcrypt',
required: host_machine.system() == 'windows',
Expand Down Expand Up @@ -82,8 +87,16 @@
'source/xml_parser.c',
)

public_c_args = ['-DAWS_COMMON_USE_IMPORT_EXPORT']
c_args = ['-DAWS_COMMON_EXPORTS']
c_args = ['-DAWS_COMMON_EXPORTS=1']

# AWS_COMMON_USE_IMPORT_EXPORT should not be defined for static libraries on Windows
public_c_args = []
if (
get_option('default_library') == 'shared'
and host_machine.system() == 'windows'
) or host_machine.system() != 'windows'
public_c_args += ['-DAWS_COMMON_USE_IMPORT_EXPORT=1']
endif

if host_machine.cpu_family() in ['x86', 'x86_64']
if cc.get_argument_syntax() == 'msvc'
Expand Down Expand Up @@ -124,11 +137,15 @@

if host_machine.system() == 'darwin'
platform_src = posix_src + files(
'source/platform_fallback_stubs/file_direct_io.c',
'source/platform_fallback_stubs/system_info.c',
)
c_args += ['-DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_NONE']
elif host_machine.system() == 'linux'
platform_src = posix_src + files('source/linux/system_info.c')
platform_src = posix_src + files(
'source/linux/file_direct_io.c',
'source/linux/system_info.c',
)
if cc.has_function(
'pthread_attr_setaffinity_np',
prefix: '#include <pthread.h>',
Expand All @@ -139,6 +156,7 @@
endif
elif host_machine.system() == 'windows'
platform_src = files(
'source/platform_fallback_stubs/file_direct_io.c',
'source/platform_fallback_stubs/system_info.c',
'source/windows/clock.c',
'source/windows/condition_variable.c',
Expand All @@ -158,6 +176,11 @@
'-DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_NONE',
'-DWINDOWS_KERNEL_LIB=kernel32',
]
elif host_machine.system() == 'emscripten'
platform_src = posix_src + files(
'source/platform_fallback_stubs/system_info.c',
)
c_args += ['-DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_NONE']
else
error('Unsupported platform: ' + host_machine.system())
endif
Expand All @@ -169,7 +192,7 @@
generic_src,
platform_src,
arch_src,
dependencies: [libcbor, cjson, threads, m, bcrypt, shlwapi, foundation],
dependencies: [libcbor, cjson, threads, m, dl, bcrypt, shlwapi, foundation],
c_args: c_args + public_c_args,
include_directories: inc,
install: true,
Expand Down
Loading