AX: soft link libAccessibility.dylb
[WebKit-https.git] / Source / WebKit / Configurations / WebKit.xcconfig
1 // Copyright (C) 2010, 2013, 2014 Apple Inc. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions
5 // are met:
6 // 1. Redistributions of source code must retain the above copyright
7 //    notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright
9 //    notice, this list of conditions and the following disclaimer in the
10 //    documentation and/or other materials provided with the distribution.
11 //
12 // THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
16 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24 #include "BaseTarget.xcconfig"
25
26 PRODUCT_NAME = WebKit;
27 PRODUCT_BUNDLE_IDENTIFIER = com.apple.$(PRODUCT_NAME:rfc1034identifier);
28 INFOPLIST_FILE = Info.plist;
29
30 DEFINES_MODULE = YES;
31 MODULEMAP_FILE = $(MODULEMAP_FILE_$(WK_COCOA_TOUCH));
32 MODULEMAP_FILE_cocoatouch = Modules/iOS.modulemap;
33 MODULEMAP_FILE_ = Modules/OSX.modulemap;
34
35 INSTALL_PATH = $(WEBKIT_FRAMEWORKS_DIR);
36 DYLIB_INSTALL_NAME_BASE = $(DYLIB_INSTALL_NAME_BASE_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
37 DYLIB_INSTALL_NAME_BASE_NO = $(NORMAL_WEBKIT_FRAMEWORKS_DIR);
38 DYLIB_INSTALL_NAME_BASE_YES = $(DYLIB_INSTALL_NAME_BASE);
39
40 LIBRARY_SEARCH_PATHS = $(inherited) "$(LIBWEBRTC_LIBRARY_DIR)";
41
42 WK_ACCESSIBILITY_LDFLAGS = $(WK_ACCESSIBILITY_LDFLAGS_$(WK_PLATFORM_NAME));
43 WK_ACCESSIBILITY_LDFLAGS_iphoneos = -lAccessibility;
44 WK_ACCESSIBILITY_LDFLAGS_iphonesimulator = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos);
45 WK_ACCESSIBILITY_LDFLAGS_watchos = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos);
46 WK_ACCESSIBILITY_LDFLAGS_appletvos = $(WK_ACCESSIBILITY_LDFLAGS_iphoneos);
47 WK_ACCESSIBILITY_LDFLAGS_macosx = $(WK_ACCESSIBILITY_LDFLAGS$(WK_MACOS_1014));
48 WK_ACCESSIBILITY_LDFLAGS_MACOS_SINCE_1014 = -weak_library /usr/lib/libAccessibility.dylib;
49
50 WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME));
51 WK_APPKIT_LDFLAGS_macosx = -framework AppKit;
52
53 WK_ASSERTION_SERVICES_LDFLAGS = $(WK_ASSERTION_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
54 WK_ASSERTION_SERVICES_LDFLAGS_cocoatouch = -framework AssertionServices;
55
56 WK_CARBON_LDFLAGS = $(WK_CARBON_LDFLAGS_$(WK_PLATFORM_NAME));
57 WK_CARBON_LDFLAGS_macosx = -framework Carbon;
58
59 WK_CORE_PDF_LDFLAGS = $(WK_CORE_PDF_LDFLAGS_$(WK_COCOA_TOUCH));
60 WK_CORE_PDF_LDFLAGS_cocoatouch = -framework CorePDF;
61
62 WK_CORE_PREDICTION_LDFLAGS = $(WK_CORE_PREDICTION_LDFLAGS_$(WK_HAVE_CORE_PREDICTION));
63 WK_CORE_PREDICTION_LDFLAGS_YES = $(WK_MACOS_WEAK_FRAMEWORK) CorePrediction;
64
65 WK_CORE_SERVICES_LDFLAGS = $(WK_CORE_SERVICES_LDFLAGS_$(WK_PLATFORM_NAME));
66 WK_CORE_SERVICES_LDFLAGS_macosx = -framework CoreServices;
67
68 WK_GRAPHICS_SERVICES_LDFLAGS = $(WK_GRAPHICS_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
69 WK_GRAPHICS_SERVICES_LDFLAGS_cocoatouch = -framework GraphicsServices;
70
71 WK_IOSURFACE_LDFLAGS = $(WK_IOSURFACE_LDFLAGS_$(WK_PLATFORM_NAME));
72 WK_IOSURFACE_LDFLAGS_iphoneos = -framework IOSurface;
73 WK_IOSURFACE_LDFLAGS_iphoneminimalsimulator = $(WK_IOSURFACE_LDFLAGS_iphoneos);
74 WK_IOSURFACE_LDFLAGS_watchos = $(WK_IOSURFACE_LDFLAGS_iphoneos);
75 WK_IOSURFACE_LDFLAGS_appletvos = $(WK_IOSURFACE_LDFLAGS_iphoneos);
76 WK_IOSURFACE_LDFLAGS_macosx = -framework IOSurface;
77
78 WK_LIBWEBRTC_LDFLAGS = $(WK_LIBWEBRTC_LDFLAGS_$(ENABLE_WEB_RTC));
79 WK_LIBWEBRTC_LDFLAGS_ = ;
80 WK_LIBWEBRTC_LDFLAGS_ENABLE_WEB_RTC = -weak-lwebrtc;
81
82 WK_MOBILE_CORE_SERVICES_LDFLAGS = $(WK_MOBILE_CORE_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
83 WK_MOBILE_CORE_SERVICES_LDFLAGS_cocoatouch = -framework MobileCoreServices;
84
85 WK_MOBILE_GESTALT_LDFLAGS = $(WK_MOBILE_GESTALT_LDFLAGS_$(WK_COCOA_TOUCH));
86 WK_MOBILE_GESTALT_LDFLAGS_cocoatouch = -lMobileGestalt;
87
88 WK_OPENGL_LDFLAGS = $(WK_OPENGL_LDFLAGS_$(WK_PLATFORM_NAME));
89 WK_OPENGL_LDFLAGS_iphoneos = -framework OpenGLES;
90 WK_OPENGL_LDFLAGS_iphoneminimalsimulator = -framework OpenGL;
91 WK_OPENGL_LDFLAGS_iphonesimulator = -framework OpenGLES;
92 WK_OPENGL_LDFLAGS_watchos = $(WK_OPENGL_LDFLAGS_iphoneos);
93 WK_OPENGL_LDFLAGS_watchsimulator = $(WK_OPENGL_LDFLAGS_iphonesimulator);
94 WK_OPENGL_LDFLAGS_appletvos = $(WK_OPENGL_LDFLAGS_iphoneos);
95 WK_OPENGL_LDFLAGS_appletvsimulator = $(WK_OPENGL_LDFLAGS_iphonesimulator);
96 WK_OPENGL_LDFLAGS_macosx = -framework OpenGL;
97
98 WK_PDFKIT_LDFLAGS = $(WK_PDFKIT_LDFLAGS_$(WK_PLATFORM_NAME));
99 WK_PDFKIT_LDFLAGS_iphoneos = -framework PDFKit;
100 WK_PDFKIT_LDFLAGS_iphonesimulator = $(WK_PDFKIT_LDFLAGS_iphoneos);
101 WK_PDFKIT_LDFLAGS_iphoneos[sdk=iphone*11.*] = ;
102 WK_PDFKIT_LDFLAGS_iphonesimulator[sdk=iphone*11.*] = ;
103
104 WK_SAFE_BROWSING_LDFLAGS = $(WK_SAFE_BROWSING_LDFLAGS_$(WK_PLATFORM_NAME));
105 WK_SAFE_BROWSING_LDFLAGS_iphoneos = -framework SafariSafeBrowsing;
106 WK_SAFE_BROWSING_LDFLAGS_iphonesimulator = -framework SafariSafeBrowsing;
107 WK_SAFE_BROWSING_LDFLAGS_iphoneos[sdk=iphone*10.*] = ;
108 WK_SAFE_BROWSING_LDFLAGS_iphonesimulator[sdk=iphone*10.*] = ;
109 WK_SAFE_BROWSING_LDFLAGS_macosx = $(WK_SAFE_BROWSING_LDFLAGS$(WK_MACOS_1013));
110 WK_SAFE_BROWSING_LDFLAGS_MACOS_SINCE_1013 = -weak_framework SafariSafeBrowsing;
111
112 WK_UIKIT_LDFLAGS = $(WK_UIKIT_LDFLAGS_$(WK_COCOA_TOUCH));
113 WK_UIKIT_LDFLAGS_cocoatouch = -framework UIKit;
114
115 FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework WebKitLegacy $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_ASSERTION_SERVICES_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PDF_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_UIKIT_LDFLAGS);
116
117 // Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
118 UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2EOS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1EOS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSEDn -Wl,-unexported_symbol, -Wl,__ZNKSt3__18functionIFvN7WebCore12PolicyActionEEEclES2_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEE4swapERS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1ERKS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2ERKS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED1Ev -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED2Ev -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSERKS4_ -Wl,-unexported_symbol, -Wl,__ZTVNSt3__117bad_function_callE;
119
120 LIBWEBRTC_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
121 LIBWEBRTC_LIBRARY_DIR[sdk=macosx*] = $(LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
122 LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
123 LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
124
125 OTHER_LDFLAGS = $(inherited) -iframework"$(SDK_DIR)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks" $(UNEXPORTED_SYMBOL_LDFLAGS) $(ASAN_OTHER_LDFLAGS) $(FRAMEWORK_AND_LIBRARY_LDFLAGS) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS);
126
127 REEXPORTED_FRAMEWORK_NAMES = WebKitLegacy;
128 REEXPORTED_FRAMEWORK_NAMES[sdk=macosx*] = $(inherited) WebCore;
129
130 // FIXME: Remove -reexport_install_name once rdar://problem/30820233 is fixed.
131 OTHER_TAPI_FLAGS[sdk=iphone*] = $(inherited) -reexport_install_name /System/Library/PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy -extra-private-header $(SRCROOT)/Platform/ExtraPrivateSymbolsForTAPI.h -extra-public-header $(SRCROOT)/Platform/ExtraPublicSymbolsForTAPI.h;
132
133 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
134 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebKit.order;
135 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,mac/WebKit2.order;
136
137 EXCLUDED_SOURCE_FILE_NAMES = Resources/ios/*;
138 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = PluginProcessShim.dylib SecItemShim.dylib WebProcessShim.dylib *.pdf Resources/mac/* com.apple.WebKit.Storage.sb com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb com.apple.WebKit.plugin-common.sb PlugInSandboxProfiles/*.sb;
139
140 INSTALLHDRS_SCRIPT_PHASE = YES;
141
142 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED[sdk=macosx*] = $(WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED$(WK_MACOS_1014));
143 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED_MACOS_BEFORE_1014 = YES;
144 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED[sdk=iphone*11.*] = YES;
145
146 WK_RELOCATABLE_FRAMEWORK_LDFLAGS = $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS_$(WK_RELOCATABLE_FRAMEWORKS));
147 WK_RELOCATABLE_FRAMEWORK_LDFLAGS_YES = -Wl,-not_for_dyld_shared_cache;