[Xcode] Streamline and future-proof target-macOS-version-dependent build setting...
[WebKit-https.git] / Source / ThirdParty / libwebrtc / Configurations / Base.xcconfig
1 #include "../../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
2
3 USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
4 USE_INTERNAL_SDK_Production = YES;
5 USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
6 USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
7
8 ALWAYS_SEARCH_USER_PATHS = NO;
9
10 CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
11 CLANG_CXX_LIBRARY = libc++;
12 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
13 CLANG_WARN_BOOL_CONVERSION = YES;
14 CLANG_WARN_CONSTANT_CONVERSION = YES;
15 CLANG_WARN_EMPTY_BODY = YES;
16 CLANG_WARN_ENUM_CONVERSION = YES;
17 CLANG_WARN_INT_CONVERSION = YES;
18 CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
19 CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
20 CLANG_WARN_STRICT_PROTOTYPES = YES;
21 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
22 DEAD_CODE_STRIPPING = YES;
23 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
24 GCC_C_LANGUAGE_STANDARD = gnu99;
25 GCC_DEBUGGING_SYMBOLS = default;
26 GCC_ENABLE_CPP_EXCEPTIONS = NO;
27 GCC_ENABLE_CPP_RTTI = NO;
28 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
29 ENABLE_STRICT_OBJC_MSGSEND = YES;
30 GCC_ENABLE_SYMBOL_SEPARATION = NO;
31 GCC_FAST_OBJC_DISPATCH = YES;
32 GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
33 GCC_NO_COMMON_BLOCKS = YES;
34 GCC_OBJC_CALL_CXX_CDTORS = YES;
35 GCC_OPTIMIZATION_LEVEL = s;
36 GCC_PRECOMPILE_PREFIX_HEADER = NO;
37 GCC_SYMBOLS_PRIVATE_EXTERN = YES;
38 GCC_THREADSAFE_STATICS = NO;
39 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
40 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
41 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
42 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
43 GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
44 GCC_WARN_ABOUT_RETURN_TYPE = YES;
45 GCC_WARN_UNDECLARED_SELECTOR = YES;
46 GCC_WARN_UNINITIALIZED_AUTOS = YES;
47 GCC_WARN_UNUSED_FUNCTION = YES;
48 GCC_WARN_UNUSED_VARIABLE = YES;
49 PREBINDING = NO;
50 STRIP_INSTALLED_PRODUCT = NO;
51 WARNING_CFLAGS = -Wexit-time-destructors -Wglobal-constructors;
52
53 SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx;
54 VALID_ARCHS = $(ARCHS_STANDARD_64_BIT);
55
56 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
57 TARGET_MAC_OS_X_VERSION_MAJOR_11 = 101100;
58 TARGET_MAC_OS_X_VERSION_MAJOR_12 = 101200;
59 TARGET_MAC_OS_X_VERSION_MAJOR_13 = 101300;
60 TARGET_MAC_OS_X_VERSION_MAJOR_14 = 101400;
61 TARGET_MAC_OS_X_VERSION_MAJOR_15 = 101500;
62
63 SDKROOT = macosx.internal;
64
65
66 // DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
67 // We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
68 DEBUG_DEFINES_debug = ;
69 DEBUG_DEFINES_normal = NDEBUG;
70 DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
71
72 GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT));
73 GCC_OPTIMIZATION_LEVEL_normal = 3;
74 GCC_OPTIMIZATION_LEVEL_debug = 0;
75
76 STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT));
77 STRIP_INSTALLED_PRODUCT_normal = YES;
78 STRIP_INSTALLED_PRODUCT_debug = NO;
79
80 DEAD_CODE_STRIPPING_debug = NO;
81 DEAD_CODE_STRIPPING_normal = YES;
82 DEAD_CODE_STRIPPING = $(DEAD_CODE_STRIPPING_$(CURRENT_VARIANT));
83
84 OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS) -fvisibility=default;
85 OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS) -fvisibility=default;
86 OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS) -fvisibility=default;
87
88 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(inherited);
89
90 EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS = $(inherited) "$(PROJECT_DIR)/Source/webrtc/examples";
91
92 NORMAL_WEBCORE_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
93 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
94
95 WK_EMPTY_ = YES;
96 WK_NOT_ = YES;
97 WK_NOT_YES = NO;
98
99 WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));
100
101 WK_OVERRIDE_FRAMEWORKS_DIR = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
102 WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;