Skip to content

Commit 2abba45

Browse files
Merge pull request #2528 from alexv-smirnov/mergelibs18
Library import 19
2 parents ac1bb12 + 0318697 commit 2abba45

File tree

13 files changed

+220
-367
lines changed

13 files changed

+220
-367
lines changed

build/platform/yfm/ya.make

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ ENDIF()
66

77
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
88
YFM_TOOL
9-
sbr:5896074622 FOR DARWIN-ARM64
10-
sbr:5896074622 FOR DARWIN
11-
sbr:5896068554 FOR LINUX
12-
sbr:5896080661 FOR WIN32
9+
sbr:5944977120 FOR DARWIN-ARM64
10+
sbr:5944977120 FOR DARWIN
11+
sbr:5944970894 FOR LINUX
12+
sbr:5944984013 FOR WIN32
1313
)
1414

1515
END()

build/ymake_conf.py

+40-33
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,32 @@
2121
logger = logging.getLogger(__name__ if __name__ != '__main__' else 'ymake_conf.py')
2222

2323

24+
class WindowsVersion(object):
25+
"""
26+
Predefined values for _WIN32_WINNT macro.
27+
This macro specifies minimal Windows version required by the binary being build.
28+
29+
A complete list of the values supported by the Windows SDK can be found at
30+
https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
31+
"""
32+
Windows07 = '0x0601'
33+
Windows08 = '0x0602'
34+
Windows10 = '0x0A00'
35+
36+
37+
# This is default Android API level unless `-DANDROID_API` is specified in cmdline
38+
# Android api level can be resolved to Android version using
39+
# https://android.googlesource.com/platform/bionic/+/master/docs/status.md
40+
ANDROID_API_DEFAULT = 21
41+
42+
# This is default Linux SDK unless `-DOS_SDK` is specified in cmdline
43+
LINUX_SDK_DEFAULT = "ubuntu-14"
44+
45+
MACOS_VERSION_MIN = "11.0"
46+
IOS_VERSION_MIN = "13.0"
47+
WINDOWS_VERSION_MIN = WindowsVersion.Windows07
48+
49+
2450
def init_logger(verbose):
2551
logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)
2652

@@ -129,9 +155,7 @@ def __init__(self, name, os, arch):
129155

130156
self.is_android = self.os == 'android'
131157
if self.is_android:
132-
# This is default Android API level unless `-DANDROID_API` is specified in cmdline
133-
default_android_api = 21
134-
self.android_api = int(preset('ANDROID_API', default_android_api))
158+
self.android_api = int(preset('ANDROID_API', ANDROID_API_DEFAULT))
135159

136160
self.is_cygwin = self.os == 'cygwin'
137161
self.is_yocto = self.os == 'yocto'
@@ -1073,7 +1097,7 @@ def _default_os_sdk(self):
10731097
return 'ubuntu-18'
10741098

10751099
# Default OS SDK for Linux builds
1076-
return 'ubuntu-14'
1100+
return LINUX_SDK_DEFAULT
10771101

10781102

10791103
class Toolchain(object):
@@ -1155,13 +1179,10 @@ def get_os_sdk(target):
11551179
for lib_path in build.host.library_path_variables:
11561180
self.env.setdefault(lib_path, []).append('{}/lib'.format(self.tc.name_marker))
11571181

1158-
macos_version_min = '11.0'
1159-
ios_version_min = '13.0'
1160-
11611182
swift_target = select(default=None, selectors=[
1162-
(target.is_iossim and target.is_x86_64, 'x86_64-apple-ios{}-simulator'.format(ios_version_min)),
1163-
(target.is_iossim and target.is_x86, 'i386-apple-ios{}-simulator'.format(ios_version_min)),
1164-
(target.is_iossim and target.is_armv8, 'arm64-apple-ios{}-simulator'.format(ios_version_min)),
1183+
(target.is_iossim and target.is_x86_64, 'x86_64-apple-ios{}-simulator'.format(IOS_VERSION_MIN)),
1184+
(target.is_iossim and target.is_x86, 'i386-apple-ios{}-simulator'.format(IOS_VERSION_MIN)),
1185+
(target.is_iossim and target.is_armv8, 'arm64-apple-ios{}-simulator'.format(IOS_VERSION_MIN)),
11651186
(not target.is_iossim and target.is_ios and target.is_armv8, 'arm64-apple-ios9'),
11661187
(not target.is_iossim and target.is_ios and target.is_armv7, 'armv7-apple-ios9'),
11671188
])
@@ -1184,11 +1205,11 @@ def get_os_sdk(target):
11841205
(target.is_linux and target.is_armv7 and target.armv7_float_abi == 'softfp', 'armv7-linux-gnueabi'),
11851206
(target.is_linux and target.is_powerpc, 'powerpc64le-linux-gnu'),
11861207

1187-
(target.is_iossim and target.is_x86_64, 'x86_64-apple-ios{}-simulator'.format(ios_version_min)),
1188-
(target.is_iossim and target.is_x86, 'i386-apple-ios{}-simulator'.format(ios_version_min)),
1189-
(target.is_iossim and target.is_armv8, 'arm64-apple-ios{}-simulator'.format(ios_version_min)),
1190-
(not target.is_iossim and target.is_ios and target.is_armv8, 'arm64-apple-ios{}'.format(ios_version_min)),
1191-
(not target.is_iossim and target.is_ios and target.is_armv7, 'armv7-apple-ios{}'.format(ios_version_min)),
1208+
(target.is_iossim and target.is_x86_64, 'x86_64-apple-ios{}-simulator'.format(IOS_VERSION_MIN)),
1209+
(target.is_iossim and target.is_x86, 'i386-apple-ios{}-simulator'.format(IOS_VERSION_MIN)),
1210+
(target.is_iossim and target.is_armv8, 'arm64-apple-ios{}-simulator'.format(IOS_VERSION_MIN)),
1211+
(not target.is_iossim and target.is_ios and target.is_armv8, 'arm64-apple-ios{}'.format(IOS_VERSION_MIN)),
1212+
(not target.is_iossim and target.is_ios and target.is_armv7, 'armv7-apple-ios{}'.format(IOS_VERSION_MIN)),
11921213

11931214
(target.is_apple and target.is_x86, 'i386-apple-darwin14'),
11941215
(target.is_apple and target.is_x86_64, 'x86_64-apple-darwin14'),
@@ -1266,9 +1287,9 @@ def get_os_sdk(target):
12661287
(target.is_linux and target.is_power8le, ['-mcpu=power8', '-mtune=power8', '-maltivec']),
12671288
(target.is_linux and target.is_power9le, ['-mcpu=power9', '-mtune=power9', '-maltivec']),
12681289
(target.is_linux and target.is_armv8, ['-march=armv8a']),
1269-
(target.is_macos, ['-mmacosx-version-min={}'.format(macos_version_min)]),
1270-
(target.is_ios and not target.is_iossim, ['-mios-version-min={}'.format(ios_version_min)]),
1271-
(target.is_iossim, ['-mios-simulator-version-min={}'.format(ios_version_min)]),
1290+
(target.is_macos, ['-mmacosx-version-min={}'.format(MACOS_VERSION_MIN)]),
1291+
(target.is_ios and not target.is_iossim, ['-mios-version-min={}'.format(IOS_VERSION_MIN)]),
1292+
(target.is_iossim, ['-mios-simulator-version-min={}'.format(IOS_VERSION_MIN)]),
12721293
(target.is_android and target.is_armv7, ['-march=armv7-a', '-mfloat-abi=softfp']),
12731294
(target.is_android and target.is_armv8, ['-march=armv8-a']),
12741295
(target.is_yocto and target.is_armv7, ['-march=armv7-a', '-mfpu=neon', '-mfloat-abi=hard', '-mcpu=cortex-a9', '-O1'])
@@ -1847,19 +1868,6 @@ def prefix(_type, _path):
18471868

18481869

18491870
class MSVC(object):
1850-
# noinspection PyPep8Naming
1851-
class WindowsVersion(object):
1852-
"""
1853-
Predefined values for _WIN32_WINNT macro.
1854-
This macro specifies minimal Windows version required by the binary being build.
1855-
1856-
A complete list of the values supported by the Windows SDK can be found at
1857-
https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
1858-
"""
1859-
Windows07 = '0x0601'
1860-
Windows08 = '0x0602'
1861-
Windows10 = '0x0A00'
1862-
18631871
def __init__(self, tc, build):
18641872
"""
18651873
:type tc: MSVCToolchainOptions
@@ -2062,8 +2070,7 @@ def print_compiler(self):
20622070
'-Wno-unused-command-line-argument',
20632071
]
20642072

2065-
win_version_min = self.WindowsVersion.Windows07
2066-
defines.append('/D_WIN32_WINNT={0}'.format(win_version_min))
2073+
defines.append('/D_WIN32_WINNT={0}'.format(WINDOWS_VERSION_MIN))
20672074

20682075
if winapi_unicode:
20692076
defines += ['/DUNICODE', '/D_UNICODE']
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
/* Copyright (C) The c-ares project and its contributors
2+
* SPDX-License-Identifier: MIT
3+
*/
4+
15
#pragma once
26

37
#include "ares_config-linux.h"
48

5-
#undef HAVE_ARPA_NAMESER_COMPAT_H
9+
/* Define to 1 if you have the getservbyport_r function. */
610
#undef HAVE_GETSERVBYPORT_R
11+
12+
/* Define to 1 if you have the getservbyname_r function. */
13+
#undef HAVE_GETSERVBYNAME_R
14+
15+
/* Define to 1 if you have the __system_property_get function */
16+
#define HAVE___SYSTEM_PROPERTY_GET

0 commit comments

Comments
 (0)