--- setup.py 2025-07-29 04:46:05.000000000 +0800 +++ setup.py 2025-08-18 14:03:26.000000000 +0800 @@ -23,7 +23,7 @@ # The minimum MACOSX_DEPLOYMENT_TARGET required for the library. If not # set, the library will use the default value from python # sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET'). -MACOS_DEPLOYMENT_TARGET_MIN = "10.15" +MACOS_DEPLOYMENT_TARGET_MIN = "10.6" # This is the minimum version of the Windows SDK needed for schannel.h with SCH_CREDENTIALS and # TLS_PARAMETERS. These are required to build Windows Binaries with TLS 1.3 support. @@ -420,9 +420,6 @@ extra_compile_args += ['/Z7'] extra_link_args += ['/DEBUG'] - elif sys.platform == 'darwin': - extra_link_args += ['-framework', 'Security'] - else: # unix if forcing_static_libs(): # linker will prefer shared libraries over static if it can find both. @@ -438,7 +435,7 @@ libraries = [':lib{}.a'.format(x) for x in libraries] # OpenBSD doesn't have librt; functions are found in libc instead. - if not sys.platform.startswith('openbsd'): + if not sys.platform.startswith('openbsd') and sys.platform != 'darwin': libraries += ['rt'] # OpenBSD 7.4+ defaults to linking with --execute-only, which is bad for AWS-LC. @@ -461,7 +458,8 @@ # this prevents weird crashes if an application also ends up using # libcrypto.so from the system's OpenSSL installation. # Do this even if using system libcrypto, since it could still be a static lib. - extra_link_args += ['-Wl,--exclude-libs,libcrypto.a'] + if sys.platform != 'darwin': + extra_link_args += ['-Wl,--exclude-libs,libcrypto.a'] if sys.platform != 'win32' or distutils.ccompiler.get_default_compiler() != 'msvc': extra_compile_args += ['-Wno-strict-aliasing', '-std=gnu99']