diff --git a/Bolts.xcodeproj/project.pbxproj b/Bolts.xcodeproj/project.pbxproj index 2f9b1d0a9..418648b0b 100644 --- a/Bolts.xcodeproj/project.pbxproj +++ b/Bolts.xcodeproj/project.pbxproj @@ -969,7 +969,7 @@ 8E9C3CE117DE9DE000427E62 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0820; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Parse Inc."; TargetAttributes = { 8E8C8F1817F241DA00E3F1C7 = { @@ -979,10 +979,11 @@ }; buildConfigurationList = 8E9C3CE417DE9DE000427E62 /* Build configuration list for PBXProject "Bolts" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 8E9C3CE017DE9DE000427E62; productRefGroup = 8E9C3CEA17DE9DE000427E62 /* Products */; @@ -1251,6 +1252,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E31D2CA0E000690609 /* Bolts-iOS-Dynamic.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = iphoneos; }; name = Debug; }; @@ -1258,6 +1261,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E31D2CA0E000690609 /* Bolts-iOS-Dynamic.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = iphoneos; }; name = Release; }; @@ -1267,6 +1272,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; @@ -1295,6 +1301,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; @@ -1318,6 +1325,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E91D2CA0E000690609 /* Bolts-watchOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = watchos; }; name = Debug; }; @@ -1325,6 +1334,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E91D2CA0E000690609 /* Bolts-watchOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = watchos; }; name = Release; }; @@ -1332,6 +1343,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E81D2CA0E000690609 /* Bolts-watchOS-Dynamic.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = watchos; }; name = Debug; }; @@ -1339,6 +1352,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E81D2CA0E000690609 /* Bolts-watchOS-Dynamic.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = watchos; }; name = Release; }; @@ -1346,6 +1361,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E61D2CA0E000690609 /* Bolts-tvOS-Dynamic.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = appletvos; }; name = Debug; }; @@ -1353,6 +1370,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E61D2CA0E000690609 /* Bolts-tvOS-Dynamic.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = appletvos; }; name = Release; }; @@ -1360,6 +1379,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E41D2CA0E000690609 /* Bolts-iOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; }; name = Debug; }; @@ -1367,6 +1389,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E41D2CA0E000690609 /* Bolts-iOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; }; name = Release; }; @@ -1374,6 +1399,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646EA1D2CA0E000690609 /* BoltsTests-iOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = iphoneos; }; name = Debug; }; @@ -1381,6 +1408,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646EA1D2CA0E000690609 /* BoltsTests-iOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = iphoneos; }; name = Release; }; @@ -1388,6 +1417,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646EB1D2CA0E000690609 /* BoltsTests-OSX.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = macosx; }; name = Debug; }; @@ -1395,6 +1426,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646EB1D2CA0E000690609 /* BoltsTests-OSX.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = macosx; }; name = Release; }; @@ -1402,6 +1435,37 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646FA1D2CA0E000690609 /* Debug.xcconfig */; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; }; name = Debug; }; @@ -1409,6 +1473,35 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646FB1D2CA0E000690609 /* Release.xcconfig */; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACOSX_DEPLOYMENT_TARGET = 10.8; + SDKROOT = iphoneos; }; name = Release; }; @@ -1416,6 +1509,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E51D2CA0E000690609 /* Bolts-macOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = macosx; }; name = Debug; }; @@ -1423,6 +1518,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E51D2CA0E000690609 /* Bolts-macOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = macosx; }; name = Release; }; @@ -1430,6 +1527,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E71D2CA0E000690609 /* Bolts-tvOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = appletvos; }; name = Debug; }; @@ -1437,6 +1536,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646E71D2CA0E000690609 /* Bolts-tvOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = appletvos; }; name = Release; }; @@ -1444,6 +1545,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646EC1D2CA0E000690609 /* BoltsTests-tvOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = appletvos; }; name = Debug; }; @@ -1451,6 +1554,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 81D646EC1D2CA0E000690609 /* BoltsTests-tvOS.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + SDKROOT = appletvos; }; name = Release; }; diff --git a/Bolts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Bolts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Bolts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-iOS-Dynamic.xcscheme b/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-iOS-Dynamic.xcscheme index 73a65f411..d7bfc56c9 100644 --- a/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-iOS-Dynamic.xcscheme +++ b/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-iOS-Dynamic.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-macOS.xcscheme b/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-macOS.xcscheme index 638deee5f..d18645b02 100644 --- a/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-macOS.xcscheme +++ b/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-macOS.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-watchOS-Dynamic.xcscheme b/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-watchOS-Dynamic.xcscheme index d034b3276..d2ca50d2f 100644 --- a/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-watchOS-Dynamic.xcscheme +++ b/Bolts.xcodeproj/xcshareddata/xcschemes/Bolts-watchOS-Dynamic.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Configurations/Shared b/Configurations/Shared deleted file mode 120000 index 818aee708..000000000 --- a/Configurations/Shared +++ /dev/null @@ -1 +0,0 @@ -../Vendor/xctoolchain/Configurations/ \ No newline at end of file diff --git a/Configurations/Shared/Common.xcconfig b/Configurations/Shared/Common.xcconfig new file mode 100644 index 000000000..5c2a6bd0a --- /dev/null +++ b/Configurations/Shared/Common.xcconfig @@ -0,0 +1,49 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +#include "Warnings.xcconfig" + +// Disable legacy-compatible header searching +ALWAYS_SEARCH_USER_PATHS = NO + +// Architectures to build +ARCHS = $(ARCHS_STANDARD) + +// Whether to enable module imports +CLANG_ENABLE_MODULES = YES +CLANG_ENABLE_MODULE_DEBUGGING = NO + +// Build Options +CLANG_ENABLE_OBJC_ARC = YES +GCC_VERSION = com.apple.compilers.llvm.clang.1_0 + +// Whether to strip out code that isn't called from anywhere +DEAD_CODE_STRIPPING = NO + +// The format of debugging symbols +DEBUG_INFORMATION_FORMAT = dwarf-with-dsym + +// C Language +GCC_C_LANGUAGE_STANDARD = gnu11 + +// C++ Language +CLANG_CXX_LANGUAGE_STANDARD = gnu++14 +CLANG_CXX_LIBRARY = libc++ + +// Code Generation +GCC_DYNAMIC_NO_PIC = NO +GCC_INLINES_ARE_PRIVATE_EXTERN = YES +GCC_NO_COMMON_BLOCKS = YES +GCC_SYMBOLS_PRIVATE_EXTERN = NO + +// Static Analyzer - Analysis Policy +RUN_CLANG_STATIC_ANALYZER = YES +CLANG_STATIC_ANALYZER_MODE_ON_ANALYZE_ACTION = deep +CLANG_STATIC_ANALYZER_MODE = shallow diff --git a/Configurations/Shared/Platform/iOS.xcconfig b/Configurations/Shared/Platform/iOS.xcconfig new file mode 100644 index 000000000..ec7a07353 --- /dev/null +++ b/Configurations/Shared/Platform/iOS.xcconfig @@ -0,0 +1,18 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +SDKROOT = iphoneos +IPHONEOS_DEPLOYMENT_TARGET = 7.0 + +// Supported device families (1 is iPhone, 2 is iPad, 3 is Apple TV) +TARGETED_DEVICE_FAMILY = 1,2 + +// Where to find embedded frameworks +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks diff --git a/Configurations/Shared/Platform/macOS.xcconfig b/Configurations/Shared/Platform/macOS.xcconfig new file mode 100644 index 000000000..05868bd93 --- /dev/null +++ b/Configurations/Shared/Platform/macOS.xcconfig @@ -0,0 +1,15 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +SDKROOT = macosx +MACOSX_DEPLOYMENT_TARGET = 10.9 + +// Where to find embedded frameworks +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks diff --git a/Configurations/Shared/Platform/tvOS.xcconfig b/Configurations/Shared/Platform/tvOS.xcconfig new file mode 100644 index 000000000..865472886 --- /dev/null +++ b/Configurations/Shared/Platform/tvOS.xcconfig @@ -0,0 +1,18 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +SDKROOT = appletvos +TVOS_DEPLOYMENT_TARGET = 9.0 + +// Supported device families (1 is iPhone, 2 is iPad, 3 is Apple TV) +TARGETED_DEVICE_FAMILY = 3 + +// Where to find embedded frameworks +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks diff --git a/Configurations/Shared/Platform/watchOS.xcconfig b/Configurations/Shared/Platform/watchOS.xcconfig new file mode 100644 index 000000000..e44beaad1 --- /dev/null +++ b/Configurations/Shared/Platform/watchOS.xcconfig @@ -0,0 +1,18 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +SDKROOT = watchos +WATCHOS_DEPLOYMENT_TARGET = 2.0 + +// Supported device families (1 is iPhone, 2 is iPad, 3 is Apple TV, 4 is watch) +TARGETED_DEVICE_FAMILY = 4 + +// Where to find embedded frameworks +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks diff --git a/Configurations/Shared/Product/Application.xcconfig b/Configurations/Shared/Product/Application.xcconfig new file mode 100644 index 000000000..8865ae735 --- /dev/null +++ b/Configurations/Shared/Product/Application.xcconfig @@ -0,0 +1,17 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +// Whether to strip out code that isn't called from anywhere +DEAD_CODE_STRIPPING = NO + +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon +ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage + +LD_RUNPATH_SEARCH_PATHS = $(inherited) @loader_path/Frameworks @executable_path/Frameworks diff --git a/Configurations/Shared/Product/DynamicFramework.xcconfig b/Configurations/Shared/Product/DynamicFramework.xcconfig new file mode 100644 index 000000000..8bdcb8154 --- /dev/null +++ b/Configurations/Shared/Product/DynamicFramework.xcconfig @@ -0,0 +1,41 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +// Dynamic frameworks are backed by dynamic library. +MACH_O_TYPE = mh_dylib + +// Whether this framework should define an LLVM module +DEFINES_MODULE = YES + +// Disable clang modules autolink +CLANG_MODULES_AUTOLINK = NO + +// Whether to strip out code that isn't called from anywhere +DEAD_CODE_STRIPPING = NO + +// Whether function calls should be position-dependent (should always be disabled for shared code) +GCC_DYNAMIC_NO_PIC = NO + +// Don't include in an xcarchive +SKIP_INSTALL = YES + +// Don't install in any specific location +INSTALL_PATH = + +// Do not require code signing +CODE_SIGNING_REQUIRED = NO + +// Disable code signing +CODE_SIGN_IDENTITY = + +// Enables the framework to be included from any location as long as the loader’s runpath search paths includes it. +// For example from an application bundle (inside the "Frameworks" folder) or shared folder. +LD_DYLIB_INSTALL_NAME = @rpath/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME) +DYLIB_INSTALL_NAME_BASE = @rpath diff --git a/Configurations/Shared/Product/LogicTests.xcconfig b/Configurations/Shared/Product/LogicTests.xcconfig new file mode 100644 index 000000000..a973ef70f --- /dev/null +++ b/Configurations/Shared/Product/LogicTests.xcconfig @@ -0,0 +1,13 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +BUNDLE_LOADER = $(TEST_HOST) + +OTHER_LDFLAGS = $(inherited) -ObjC -framework XCTest diff --git a/Configurations/Shared/Product/StaticFramework.xcconfig b/Configurations/Shared/Product/StaticFramework.xcconfig new file mode 100644 index 000000000..79a50a2f5 --- /dev/null +++ b/Configurations/Shared/Product/StaticFramework.xcconfig @@ -0,0 +1,37 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +// Static frameworks are backed by static libraries +MACH_O_TYPE = staticlib + +// Whether this framework should define an LLVM module +DEFINES_MODULE = YES + +// Disable clang modules autolink +CLANG_MODULES_AUTOLINK = NO + +// Whether to strip out code that isn't called from anywhere +DEAD_CODE_STRIPPING = NO + +// Whether function calls should be position-dependent (should always be disabled for shared code) +GCC_DYNAMIC_NO_PIC = NO + +// Enables the framework to be included from any location as long as the loader’s runpath search paths includes it. +// For example from an application bundle (inside the "Frameworks" folder) or shared folder +INSTALL_PATH = @rpath + +// Don't include in an xcarchive +SKIP_INSTALL = YES + +// Do not require code signing +CODE_SIGNING_REQUIRED = NO + +// Disable code signing +CODE_SIGN_IDENTITY = diff --git a/Configurations/Shared/Project/Debug.xcconfig b/Configurations/Shared/Project/Debug.xcconfig new file mode 100644 index 000000000..21db37ae9 --- /dev/null +++ b/Configurations/Shared/Project/Debug.xcconfig @@ -0,0 +1,32 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +#include "../Common.xcconfig" + +// Architectures +ONLY_ACTIVE_ARCH = YES + +// Optimization +GCC_OPTIMIZATION_LEVEL = 0 +SWIFT_OPTIMIZATION_LEVEL = -Onone + +// Preprocessor +GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited) +ENABLE_NS_ASSERTIONS = YES + +// Testability +ENABLE_TESTABILITY = YES + +// Deployment +COPY_PHASE_STRIP = NO + +SANITIZE_FLAGS = -fsanitize-undefined-trap-on-error -fsanitize=undefined-trap +OTHER_CFLAGS = $(value) $(SANITIZE_FLAGS) +OTHER_LDFLAGS = $(value) $(SANITIZE_FLAGS) diff --git a/Configurations/Shared/Project/Release.xcconfig b/Configurations/Shared/Project/Release.xcconfig new file mode 100644 index 000000000..9168b3612 --- /dev/null +++ b/Configurations/Shared/Project/Release.xcconfig @@ -0,0 +1,31 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +#include "../Common.xcconfig" + +// Architectures +ONLY_ACTIVE_ARCH = NO + +// Build +VALIDATE_PRODUCT = YES + +// Optimization +GCC_OPTIMIZATION_LEVEL = s +SWIFT_OPTIMIZATION_LEVEL = -Owholemodule +SWIFT_COMPILATION_MODE = wholemodule + +// Preprocessor +ENABLE_NS_ASSERTIONS = NO + +// Deployment +DEPLOYMENT_POSTPROCESSING = YES +COPY_PHASE_STRIP = YES +STRIP_STYLE = debugging +STRIP_INSTALLED_PRODUCT = YES diff --git a/Configurations/Shared/Warnings.xcconfig b/Configurations/Shared/Warnings.xcconfig new file mode 100644 index 000000000..67ff49aac --- /dev/null +++ b/Configurations/Shared/Warnings.xcconfig @@ -0,0 +1,74 @@ +// +// Copyright (c) 2015-present, Parse, LLC. +// Portions Copyright (c) 2017-present, Nikita Lutsenko +// +// All rights reserved. +// +// This source code is licensed under the BSD-style license found +// in the LICENSE file in the root directory of this source tree. +// + +ENABLE_STRICT_OBJC_MSGSEND = YES + +GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES +GCC_WARN_ABOUT_MISSING_NEWLINE = YES +GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES +GCC_WARN_CHECK_SWITCH_STATEMENTS = YES +GCC_WARN_MISSING_PARENTHESES = YES +GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES +GCC_WARN_UNKNOWN_PRAGMAS = YES +GCC_WARN_UNUSED_FUNCTION = YES +GCC_WARN_UNUSED_LABEL = YES +GCC_WARN_UNUSED_VALUE = YES +GCC_WARN_UNUSED_VARIABLE = YES +GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES +GCC_WARN_UNDECLARED_SELECTOR = YES +GCC_WARN_64_TO_32_BIT_CONVERSION = YES +GCC_WARN_UNINITIALIZED_AUTOS = YES +GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES +GCC_WARN_SHADOW = YES + +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES +CLANG_WARN_BOOL_CONVERSION = YES +CLANG_WARN_CONSTANT_CONVERSION = YES +CLANG_WARN_DOCUMENTATION_COMMENTS = YES +CLANG_WARN_EMPTY_BODY = YES +CLANG_WARN_ENUM_CONVERSION = YES +CLANG_WARN_UNREACHABLE_CODE = YES +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES +CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES +CLANG_WARN_BOOL_CONVERSION = YES +CLANG_WARN_INFINITE_RECURSION = YES +CLANG_WARN_SUSPICIOUS_MOVE = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_RANGE_LOOP_ANALYSIS = YES +CLANG_WARN_COMMA = YES +CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES + +// Errors +GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR +CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR +CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR + +// Static Analyzer Warnings +CLANG_ANALYZER_NONNULL = YES +CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES + +// +// Extra warnings, not available directly in build settings. +// 'auto-import' - warns when an old-style hashed import could be replaced with modular import aka @import. +// 'switch-enum' - enforces explicit handling of cases in switch statements. +// 'method-signatures' - enforces method signatures to always match. +// 'idiomatic-parentheses' - do not allow usage of an assignment as a condition without extra paranthesis. +// 'covered-switch-default' - warns when implementing 'default' case in switch statement that covers all options. +// 'custom-atomic-properties' - safeguards atomic properties with custom implementations. +// 'cstring-format-directive' - do not allow NSString * to be used as c-string formatting argument aka '%s'. +// 'conditional-uninitialized' - warn about potential use of of uninitialized variables. +// 'unused-exception-parameter' - @try @catch without usage of exception parameter. +// 'missing-variable-declarations' - will mark all variables that are missing declarations, including non-static extern constants. +// +WARNING_CFLAGS = $(inherited) -Wswitch-enum -Wmethod-signatures -Widiomatic-parentheses -Wcustom-atomic-properties -Wconditional-uninitialized -Wunused-exception-parameter -Wmissing-variable-declarations