diff --git a/releases.json b/releases.json index eb568253b3..ed18eb6530 100644 --- a/releases.json +++ b/releases.json @@ -277,6 +277,7 @@ "aws-c-common" ], "versions": [ + "0.12.6-1", "0.12.4-3", "0.12.4-2", "0.12.4-1" diff --git a/subprojects/aws-c-common.wrap b/subprojects/aws-c-common.wrap index c3b2e5ce57..206f53bee6 100644 --- a/subprojects/aws-c-common.wrap +++ b/subprojects/aws-c-common.wrap @@ -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] diff --git a/subprojects/packagefiles/aws-c-common/include/aws/common/meson.build b/subprojects/packagefiles/aws-c-common/include/aws/common/meson.build index c6c8ee4e50..5c875ab1dd 100644 --- a/subprojects/packagefiles/aws-c-common/include/aws/common/meson.build +++ b/subprojects/packagefiles/aws-c-common/include/aws/common/meson.build @@ -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"); } ''' @@ -108,6 +108,7 @@ cfg_data.set( cc.links( avx2_intrinsics, name: 'avx2_intrinsics', + args: cc.get_supported_arguments('/arch:AVX2', '-mavx2'), ), ) @@ -125,6 +126,7 @@ cfg_data.set( cc.links( avx512_intrinsics, name: 'avx512_intrinsics', + args: cc.get_supported_arguments('/arch:AVX512', '-mavx512f'), ), ) @@ -144,6 +146,7 @@ cfg_data.set( cc.links( mm256_extract_epi64, name: 'mm256_extract_epi64', + args: cc.get_supported_arguments('/arch:AVX', '-mavx'), ), ) @@ -164,6 +167,7 @@ cfg_data.set( cc.links( clmul, name: 'clmul', + args: cc.get_supported_arguments('-mpclmul'), ), ) @@ -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') diff --git a/subprojects/packagefiles/aws-c-common/meson.build b/subprojects/packagefiles/aws-c-common/meson.build index 756138a976..54d61fc7c0 100644 --- a/subprojects/packagefiles/aws-c-common/meson.build +++ b/subprojects/packagefiles/aws-c-common/meson.build @@ -1,7 +1,7 @@ project( 'aws-c-common', 'c', - version: '0.12.4', + version: '0.12.6', meson_version: '>=0.63.0', license: 'Apache-2.0', default_options: ['warning_level=3'], @@ -18,6 +18,11 @@ m = cc.find_library( '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', @@ -82,8 +87,16 @@ generic_src = files( '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' @@ -124,11 +137,15 @@ posix_src = files( 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 ', @@ -139,6 +156,7 @@ elif host_machine.system() == 'linux' 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', @@ -158,6 +176,11 @@ elif host_machine.system() == 'windows' '-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 @@ -169,7 +192,7 @@ libaws_c_common = library( 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,