forked from microsoft/appcenter-sdk-apple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Global.xcconfig
130 lines (103 loc) · 5.48 KB
/
Global.xcconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
BUILD_NUMBER = 1
VERSION_STRING = 0.6.2
SDK_NAME = mobilecenter.ios
// :Mark: Architectures
MS_ARM_ARCHS = armv7 armv7s arm64
MS_SIM_ARCHS = x86_64 i386
ARCHS = $(MS_ARM_ARCHS)
VALID_ARCHS = $(MS_ARM_ARCHS)
// :Mark: OTHER_CFLAGS
// This flag adds -fembed-bitcode-marker in the release configuration
// but we require the full bitcode flag -fembed-bitcode in this case.
ENABLE_BITCODE = NO;
OTHER_CFLAGS = -Wshorten-64-to-32 -Wall -fstack-protector-strong -fpie
// Use empty bitcode marker in simulators and debug configurations for real devices.
OTHER_CFLAGS[sdk=iphonesimulator*] = $(OTHER_CFLAGS) -fembed-bitcode-marker
OTHER_CFLAGS[config=Debug][sdk=iphoneos*] = $(OTHER_CFLAGS) -fembed-bitcode-marker
// Activate full bitcode on release configuration for real devices.
OTHER_CFLAGS[config=Release][sdk=iphoneos*] = $(OTHER_CFLAGS) -fembed-bitcode
// :Mark: Extension API Only
// Make sure we don't use API that are not available in extensions.
// See https://pewpewthespells.com/blog/buildsettings.html for info about the flag.
APPLICATION_EXTENSION_API_ONLY = YES;
// :Mark: GCC_PREPROCESSOR_DEFINITIONS
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(XCODEBUILD_GCC_PREPROCESSOR_DEFINITIONS) MOBILE_CENTER_CONFIGURATION_$(CONFIGURATION) MOBILE_CENTER_NAME="@\""$(SDK_NAME)"\"" MOBILE_CENTER_VERSION="@\""$(VERSION_STRING)"\"" MOBILE_CENTER_BUILD="@\""$(BUILD_NUMBER)"\"" MOBILE_CENTER_C_NAME="\""$(SDK_NAME)"\"" MOBILE_CENTER_C_VERSION="\""$(VERSION_STRING)"\"" MOBILE_CENTER_C_BUILD="\""$(BUILD_NUMBER)"\""
// :Mark: Configuration of warnings. We're listing every warning that we disabled and explain the reason why.
//
// -everything
// We want the best possible diagnostics, so we simply enable everything that exists, and then opt–out of what doesn’t make sense for us.
// -objc-missing-property-synthesis
// This isn’t a real issue since we don’t have any interest in building on extremely old Clangs.
// (Also, each property that cannot be auto–synthesized triggers at least a warning…)
// -float-equal
// While we could change all 90 instances of floating point comparison to a method that includes an epsilon, this is overkill and not needed.
// See http://stackoverflow.com/questions/11421756/weverything-yielding-comparing-floating-point-with-or-is-unsafe
// -pedantic
// Generates too much noise.
// -padded
// This isn’t really an issue to us, since we’re not programming embedded systems.
// -c++98
// We don't want to compile our code for C++98, no need to be warned about incompatibility.
// -c++98-compat-pedantic
// We don't want to compile our code for C++98, no need to be warned about incompatibility.
// -auto-import
// Standard ``import`` is used by tons of files and C++ code limits the possibility to use @import so we don't . => Disabled.
// -assign-enum
// A lot of api use enums as params but Apple's docs suggest passing in 0 which causes annoying warnings.
// -exit-time-destructors
// Global destructors are obvious, no need to warn about them.
// -global-constructors
// Global constructors are obvious, no need to warn about them.
// -cast-align
// We're not interested in this one as the Mach-O format is itself well-aligned and the original memory allocation
// happens through malloc() and mmap() which always return at least 16byte alignment.
// Reas more about alignment in the c++ reference: http://en.cppreference.com/w/cpp/language/object#Alignment.
WARNING_CFLAGS = -Weverything -Wno-objc-missing-property-synthesis -Wno-float-equal -Wno-pedantic -Wno-padded -Wno-sign-conversion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-auto-import -Wno-assign-enum -Wno-exit-time-destructors -Wno-global-constructors -Wno-cast-align
// These are all partially (but not completely?) independent of WARNING_CFLAGS
// and need to be specified explicitly.
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_MISSING_PARENTHESES = YES
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_PARAMETER = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_WARN_UNUSED_VALUE = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_SHADOW = YES
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES
CLANG_WARN_CXX0X_EXTENSIONS = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
CLANG_WARN_UNREACHABLE_CODE = YES
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
// Enable extra analyze modes
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
CLANG_ANALYZER_NONNULL = YES
// Enable warnings-are-errors for all modes. Don't do this just yet.
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES