e442099802c1596808de99c653a8fd7796c651b2
[WebKit-https.git] / Source / ThirdParty / libwebrtc / Configurations / Base.xcconfig
1 #include? "../../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
2 #include? "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/PlatformSupport.xcconfig"
3 #include "SDKVariant.xcconfig"
4 #include "WebKitTargetConditionals.xcconfig"
5
6 CODE_SIGN_IDENTITY = -;
7
8 USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
9 USE_INTERNAL_SDK_Production = YES;
10 USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
11 USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
12
13 ALWAYS_SEARCH_USER_PATHS = NO;
14
15 CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
16 CLANG_CXX_LIBRARY = libc++;
17 CLANG_ENABLE_OBJC_ARC = YES;
18 CLANG_ENABLE_OBJC_WEAK = YES;
19 CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
20 CLANG_WARN_BOOL_CONVERSION = YES;
21 CLANG_WARN_CONSTANT_CONVERSION = YES;
22 CLANG_WARN_EMPTY_BODY = YES;
23 CLANG_WARN_ENUM_CONVERSION = YES;
24 CLANG_WARN_INFINITE_RECURSION = YES;
25 CLANG_WARN_INT_CONVERSION = YES;
26 CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
27 CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
28 CLANG_WARN_STRICT_PROTOTYPES = YES;
29 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
30 DEAD_CODE_STRIPPING = YES;
31 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
32 GCC_C_LANGUAGE_STANDARD = gnu99;
33 GCC_DEBUGGING_SYMBOLS = default;
34 GCC_ENABLE_CPP_EXCEPTIONS = NO;
35 GCC_ENABLE_CPP_RTTI = NO;
36 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
37 ENABLE_STRICT_OBJC_MSGSEND = YES;
38 GCC_ENABLE_SYMBOL_SEPARATION = NO;
39 GCC_FAST_OBJC_DISPATCH = YES;
40 GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
41 GCC_NO_COMMON_BLOCKS = YES;
42 GCC_OBJC_CALL_CXX_CDTORS = YES;
43 GCC_OPTIMIZATION_LEVEL = s;
44 GCC_PRECOMPILE_PREFIX_HEADER = NO;
45 GCC_SYMBOLS_PRIVATE_EXTERN = YES;
46 GCC_THREADSAFE_STATICS = NO;
47 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
48 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
49 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
50 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
51 GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
52 GCC_WARN_ABOUT_RETURN_TYPE = YES;
53 GCC_WARN_UNDECLARED_SELECTOR = YES;
54 CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
55 CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
56 GCC_WARN_UNINITIALIZED_AUTOS = YES;
57 GCC_WARN_UNUSED_FUNCTION = YES;
58 GCC_WARN_UNUSED_VARIABLE = YES;
59 CLANG_WARN_SUSPICIOUS_MOVE = YES;
60 PREBINDING = NO;
61 STRIP_INSTALLED_PRODUCT = NO;
62 WARNING_CFLAGS = -Wexit-time-destructors -Wglobal-constructors -Wthread-safety;
63
64 SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx;
65 VALID_ARCHS = $(ARCHS_STANDARD_64_BIT);
66
67 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
68 TARGET_MAC_OS_X_VERSION_MAJOR_12 = 101200;
69 TARGET_MAC_OS_X_VERSION_MAJOR_13 = 101300;
70 TARGET_MAC_OS_X_VERSION_MAJOR_14 = 101400;
71 TARGET_MAC_OS_X_VERSION_MAJOR_15 = 101500;
72 TARGET_MAC_OS_X_VERSION_MAJOR_16 = 101600;
73
74 SDKROOT = macosx.internal;
75
76
77 // DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
78 // We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
79 DEBUG_DEFINES_debug = ;
80 DEBUG_DEFINES_normal = NDEBUG;
81 DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
82
83 GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT));
84 GCC_OPTIMIZATION_LEVEL_normal = 3;
85 GCC_OPTIMIZATION_LEVEL_debug = 0;
86
87 STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT));
88 STRIP_INSTALLED_PRODUCT_normal = YES;
89 STRIP_INSTALLED_PRODUCT_debug = NO;
90
91 DEAD_CODE_STRIPPING_debug = NO;
92 DEAD_CODE_STRIPPING_normal = YES;
93 DEAD_CODE_STRIPPING = $(DEAD_CODE_STRIPPING_$(CURRENT_VARIANT));
94
95 OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS) -fvisibility=default;
96 OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS) -fvisibility=default;
97 OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS) -fvisibility=default;
98
99 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(inherited) ABSL_ALLOCATOR_NOTHROW;
100
101 EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS = $(inherited) "$(PROJECT_DIR)/Source/webrtc/examples" "$(PROJECT_DIR)/Source/third_party/boringssl/src/util";
102
103 NORMAL_WEBCORE_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
104 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
105
106 WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));
107
108 WK_OVERRIDE_FRAMEWORKS_DIR = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
109 WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(WK_INSTALL_PATH_PREFIX)$(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
110
111 WK_INSTALL_PATH_PREFIX = $(WK_INSTALL_PATH_PREFIX_DEPLOYMENT_$(DEPLOYMENT_LOCATION)$(WK_MACOS_1015)_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
112 WK_INSTALL_PATH_PREFIX_DEPLOYMENT_YES_MACOS_SINCE_1015_USE_STAGING_INSTALL_PATH_YES = $(PLATFORM_OOB_SYSTEM_CONTENT_DIR);
113
114 // Disable on all platforms other than macOS, due to <rdar://problem/49013399>.
115 LLVM_LTO = NO;
116 LLVM_LTO[sdk=macosx*] = $(WK_LLVM_LTO_$(WK_XCODE_SUPPORTS_LTO));
117 WK_LLVM_LTO_NO = NO;
118 WK_LLVM_LTO_YES = $(WK_USER_LTO_MODE);
119
120 WK_XCODE_SUPPORTS_LTO = $(WK_NOT_$(WK_XCODE_VERSION_BEFORE_10_2_$(XCODE_VERSION_MAJOR)));
121 WK_XCODE_VERSION_BEFORE_10_2_0700 = YES;
122 WK_XCODE_VERSION_BEFORE_10_2_0800 = YES;
123 WK_XCODE_VERSION_BEFORE_10_2_0900 = YES;
124 WK_XCODE_VERSION_BEFORE_10_2_1000 = $(WK_XCODE_VERSION_BEFORE_10_2_1000_$(XCODE_VERSION_MINOR));
125 WK_XCODE_VERSION_BEFORE_10_2_1000_1000 = YES;
126 WK_XCODE_VERSION_BEFORE_10_2_1000_1010 = YES;
127
128 WK_USER_LTO_MODE = $(WK_USER_LTO_MODE_$(WK_LTO_MODE));
129 WK_USER_LTO_MODE_full = YES;
130 WK_USER_LTO_MODE_thin = YES_THIN;
131 WK_USER_LTO_MODE_none = NO;
132 WK_USER_LTO_MODE_ = $(WK_DEFAULT_LTO_MODE);
133 WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_thin);