Skip to content

Commit b7956a7

Browse files
committed
DEPLOYMENT_TARGET_ANDROID -> TARGET_OS_ANDROID
1 parent c6daa28 commit b7956a7

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

CoreFoundation/Base.subproj/CFInternal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ extern void __CFGenericValidateType_(CFTypeRef cf, CFTypeID type, const char *fu
229229
#define __CFBitfield64GetValue(V, N1, N2) (((V) & __CFBitfield64Mask(N1, N2)) >> (N2))
230230
#define __CFBitfield64SetValue(V, N1, N2, X) ((V) = ((V) & ~__CFBitfield64Mask(N1, N2)) | ((((uint64_t)X) << (N2)) & __CFBitfield64Mask(N1, N2)))
231231

232-
#if TARGET_RT_64_BIT || DEPLOYMENT_TARGET_ANDROID
232+
#if TARGET_RT_64_BIT || TARGET_OS_ANDROID
233233
typedef uint64_t __CFInfoType;
234234
#define __CFInfoMask(N1, N2) __CFBitfield64Mask(N1, N2)
235235
#else

CoreFoundation/Base.subproj/CFKnownLocations.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ CFURLRef _Nullable _CFKnownLocationCreatePreferencesURLForUser(CFKnownLocationUs
4545
}
4646

4747
}
48-
#elif !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
48+
#elif !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
4949

5050
/*
5151
Building for an OS that uses the FHS, BSD's hier(7), and/or the XDG specification for paths:

CoreFoundation/Base.subproj/CFPlatform.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ CF_EXPORT CFStringRef CFCopyUserName(void) {
295295
return result;
296296
}
297297

298-
#if DEPLOYMENT_TARGET_ANDROID
298+
#if TARGET_OS_ANDROID
299299
#define pw_gecos pw_name
300300
#endif
301301

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ CF_CROSS_PLATFORM_EXPORT int _CFOpenFile(const char *path, int opts);
501501
static inline int _direntNameLength(struct dirent *entry) {
502502
#ifdef _D_EXACT_NAMLEN // defined on Linux
503503
return _D_EXACT_NAMLEN(entry);
504-
#elif DEPLOYMENT_TARGET_ANDROID
504+
#elif TARGET_OS_ANDROID
505505
return strlen(entry->d_name);
506506
#else
507507
return entry->d_namlen;

CoreFoundation/PlugIn.subproj/CFBundle.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static Boolean _CFBundleURLIsForFHSInstalledBundle(CFURLRef bundleURL) {
163163
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
164164

165165
CF_CROSS_PLATFORM_EXPORT Boolean _CFBundleSupportsFHSBundles() {
166-
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
166+
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
167167
return true;
168168
#else
169169
return false;

CoreFoundation/PlugIn.subproj/CFBundle_Executable.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <dlfcn.h>
1717
#endif
1818

19-
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
19+
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
2020

2121
#if TARGET_OS_LINUX
2222
#if TARGET_RT_64_BIT
@@ -49,7 +49,7 @@
4949
_kCFBundleFHSDirectory_lib
5050
#endif // TARGET_OS_LINUX
5151

52-
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
52+
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
5353

5454
// This is here because on iPhoneOS with the dyld shared cache, we remove binaries from their
5555
// original locations on disk, so checking whether a binary's path exists is no longer sufficient.
@@ -200,7 +200,7 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
200200
Boolean doExecSearch = true;
201201
#endif
202202

203-
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
203+
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
204204
if (lookupMainExe && bundle && bundle->_isFHSInstalledBundle) {
205205
// For a FHS installed bundle, the URL points to share/Bundle.resources, and the binary is in:
206206

@@ -224,13 +224,13 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
224224

225225
CFRelease(prefixPath);
226226
}
227-
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
227+
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
228228

229229
// Now, look for the executable inside the bundle.
230230
if (!foundIt && doExecSearch && 0 != version) {
231231
CFURLRef exeDirURL = NULL;
232232

233-
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
233+
#if !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
234234
if (bundle && bundle->_isFHSInstalledBundle) {
235235
CFURLRef withoutExtension = CFURLCreateCopyDeletingPathExtension(kCFAllocatorSystemDefault, url);
236236
CFStringRef lastPathComponent = CFURLCopyLastPathComponent(withoutExtension);
@@ -245,7 +245,7 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
245245
CFRelease(libexec);
246246
CFRelease(exeDirName);
247247
} else
248-
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !DEPLOYMENT_TARGET_ANDROID
248+
#endif // !DEPLOYMENT_RUNTIME_OBJC && !TARGET_OS_WIN32 && !TARGET_OS_ANDROID
249249
if (1 == version) {
250250
exeDirURL = CFURLCreateWithString(kCFAllocatorSystemDefault, _CFBundleExecutablesURLFromBase1, url);
251251
} else if (2 == version) {

build-android

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ if [ ! -f libFoundation.so ]; then
107107
BUILD_DIR="$SWIFT_ANDROID_BUILD_PATH/foundation-linux-x86_64" \
108108
DSTROOT="/" \
109109
PREFIX="/usr" \
110-
CFLAGS="-DDEPLOYMENT_TARGET_ANDROID -DDEPLOYMENT_ENABLE_LIBDISPATCH --sysroot=$ANDROID_NDK_PATH/platforms/android-21/arch-arm -I$ANDROID_ICU_PATH/armeabi-v7a/include -I${SDKROOT}/lib/swift -I$ANDROID_NDK_PATH/sources/android/support/include -I$ANDROID_STANDALONE_SYSROOT/usr/include -I$SWIFT_PATH/swift-corelibs-foundation/closure" \
111-
SWIFTCFLAGS="-DDEPLOYMENT_TARGET_ANDROID -DDEPLOYMENT_ENABLE_LIBDISPATCH -I$ANDROID_NDK_PATH/platforms/android-21/arch-arm/usr/include" \
110+
CFLAGS="-DDEPLOYMENT_ENABLE_LIBDISPATCH --sysroot=$ANDROID_NDK_PATH/platforms/android-21/arch-arm -I$ANDROID_ICU_PATH/armeabi-v7a/include -I${SDKROOT}/lib/swift -I$ANDROID_NDK_PATH/sources/android/support/include -I$ANDROID_STANDALONE_SYSROOT/usr/include -I$SWIFT_PATH/swift-corelibs-foundation/closure" \
111+
SWIFTCFLAGS="-DDEPLOYMENT_ENABLE_LIBDISPATCH -I$ANDROID_NDK_PATH/platforms/android-21/arch-arm/usr/include" \
112112
LDFLAGS="-fuse-ld=gold --sysroot=$ANDROID_NDK_PATH/platforms/android-21/arch-arm -L$ANDROID_NDK_PATH/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x -L$ANDROID_ICU_PATH/armeabi-v7a -L$ANDROID_STANDALONE_SYSROOT/usr/lib -ldispatch " \
113113
./configure \
114114
Release \

0 commit comments

Comments
 (0)