Unreviewed, rolling out r227211.
[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[sdk=macosx*]=Modules/OSX.modulemap;
32 MODULEMAP_FILE[sdk=iphone*]=Modules/iOS.modulemap;
33
34 INSTALL_PATH = $(WEBKIT_FRAMEWORKS_DIR);
35 DYLIB_INSTALL_NAME_BASE = $(NORMAL_WEBKIT_FRAMEWORKS_DIR);
36
37 LIBRARY_SEARCH_PATHS = $(inherited) "$(LIBWEBRTC_LIBRARY_DIR)";
38
39 FRAMEWORK_AND_LIBRARY_LDFLAGS_BASE_ios = -lobjc -framework AssertionServices -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CorePDF -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework UIKit -framework OpenGLES -framework MobileCoreServices -lMobileGestalt $(FRAMEWORK_AND_LIBRARY_LDFLAGS_PLATFORM_$(PLATFORM_NAME));
40 FRAMEWORK_AND_LIBRARY_LDFLAGS[sdk=iphoneos*] = $(FRAMEWORK_AND_LIBRARY_LDFLAGS_BASE_ios) -framework IOSurface;
41 FRAMEWORK_AND_LIBRARY_LDFLAGS[sdk=iphonesimulator*] = $(FRAMEWORK_AND_LIBRARY_LDFLAGS_BASE_ios);
42 FRAMEWORK_AND_LIBRARY_LDFLAGS_PLATFORM_iphoneos = ;
43 FRAMEWORK_AND_LIBRARY_LDFLAGS_PLATFORM_iphonesimulator = ;
44 FRAMEWORK_AND_LIBRARY_LDFLAGS[sdk=macosx*] = -framework ApplicationServices -framework Carbon -framework Cocoa -framework CoreServices -framework IOKit -framework CoreAudio -framework IOSurface -framework OpenGL;
45
46 // Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
47 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;
48
49 LIBWEBRTC_LDFLAGS = $(LIBWEBRTC_LDFLAGS_$(ENABLE_WEB_RTC));
50 LIBWEBRTC_LDFLAGS_ = ;
51 LIBWEBRTC_LDFLAGS_ENABLE_WEB_RTC = -weak-lwebrtc;
52
53 LIBWEBRTC_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
54 LIBWEBRTC_LIBRARY_DIR[sdk=macosx*] = $(LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
55 LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
56 LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
57
58 OTHER_LDFLAGS = $(inherited) -F"$(SDK_DIR)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks" $(UNEXPORTED_SYMBOL_LDFLAGS) $(ASAN_OTHER_LDFLAGS) $(FRAMEWORK_AND_LIBRARY_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) -framework WebKitLegacy;
59 OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = $(LIBWEBRTC_LDFLAGS);
60 OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = -lAccessibility $(LIBWEBRTC_LDFLAGS);
61 OTHER_LDFLAGS_PLATFORM[sdk=iphonesimulator*] = -lAccessibility $(LIBWEBRTC_LDFLAGS);
62
63 REEXPORTED_FRAMEWORK_NAMES = WebKitLegacy;
64 REEXPORTED_FRAMEWORK_NAMES[sdk=macosx*] = $(inherited) WebCore;
65
66 // FIXME: Remove -reexport_install_name once rdar://problem/30820233 is fixed.
67 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;
68
69 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
70 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebKit.order;
71 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,mac/WebKit2.order;
72
73 EXCLUDED_SOURCE_FILE_NAMES = Resources/ios/*;
74 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = PluginProcessShim.dylib SecItemShim.dylib WebProcessShim.dylib *.pdf Resources/mac/* com.apple.WebKit.Databases.sb com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb com.apple.WebKit.plugin-common.sb PlugInSandboxProfiles/*.sb;
75
76 INSTALLHDRS_SCRIPT_PHASE = YES;
77
78 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED[sdk=macosx*] = $(WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
79 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED_macosx_101100 = YES;
80 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED_macosx_101200 = YES;
81 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED[sdk=iphone*11.0*] = YES;
82
83 WK_RELOCATABLE_FRAMEWORK_LDFLAGS = $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS_$(WK_RELOCATABLE_FRAMEWORKS));
84 WK_RELOCATABLE_FRAMEWORK_LDFLAGS_YES = -Wl,-not_for_dyld_shared_cache;
85
86 WK_CORE_PREDICTION_LDFLAGS = $(WK_CORE_PREDICTION_LDFLAGS_$(WK_HAVE_CORE_PREDICTION));
87 WK_CORE_PREDICTION_LDFLAGS_YES = -framework CorePrediction;
88 WK_CORE_PREDICTION_LDFLAGS_YES[sdk=macosx*] = -weak_framework CorePrediction;