[Mac] Enable library validation for Networking & Storage XPC services
[WebKit-https.git] / Source / WebKit / Configurations / BaseXPCService.xcconfig
1 // Copyright (C) 2012-2016 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 VALID_ARCHS[sdk=macosx*] = $(VALID_ARCHS_macosx_$(ONLY_ACTIVE_ARCH));
27 VALID_ARCHS_macosx_YES = $(VALID_ARCHS);
28 VALID_ARCHS_macosx_NO = $(ARCHS_STANDARD);
29
30 EXECUTABLE_SUFFIX = $(WK_XPC_SERVICE_SUFFIX);
31
32 INSTALL_PATH[sdk=iphone*] = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/XPCServices;
33 INSTALL_PATH[sdk=macosx*] = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/Versions/A/XPCServices;
34
35 APP_ICON = $(APP_ICON_$(CONFIGURATION));
36 APP_ICON_Debug = WebKit.icns;
37 APP_ICON_Release = WebKit.icns;
38 APP_ICON_Production = ;
39
40 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(CONFIGURATION));
41 EXCLUDED_SOURCE_FILE_NAMES_Production = WebKit.icns;
42
43 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = $(EXCLUDED_SOURCE_FILE_NAMES_$(CONFIGURATION)) *.xib;
44
45 OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH) $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS);
46
47 WK_RELOCATABLE_FRAMEWORKS_LDFLAGS = $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS_$(WK_RELOCATABLE_FRAMEWORKS));
48 WK_RELOCATABLE_FRAMEWORKS_LDFLAGS_ = $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS_NO);
49 WK_RELOCATABLE_FRAMEWORKS_LDFLAGS_NO = -Wl,-headerpad,0x130; // Leave room for adding the dyld environment commands to a service that wasn't built for relocatable frameworks or staged installation.
50 WK_RELOCATABLE_FRAMEWORKS_LDFLAGS_YES = -Wl,-dyld_env,DYLD_FRAMEWORK_PATH=@executable_path/$(WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK)/..,-dyld_env,DYLD_LIBRARY_PATH=@executable_path/$(WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK)/Frameworks;
51
52 WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK = $(WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK_SHALLOW_BUNDLE_$(SHALLOW_BUNDLE));
53 WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK_SHALLOW_BUNDLE_NO = ../../../../../..;
54 WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK_SHALLOW_BUNDLE_YES = ../..;
55
56 CODE_SIGN_ENTITLEMENTS[sdk=iphone*] = $(CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_$(SKIP_INSTALL));
57
58 CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_ = $(CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_NO);
59 CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_NO = $(CODE_SIGN_ENTITLEMENTS_IOS_MANUAL_SANDBOXING_$(WK_MANUAL_SANDBOXING_ENABLED));
60 CODE_SIGN_ENTITLEMENTS_IOS_SKIP_INSTALL_YES = ;
61
62 CODE_SIGN_ENTITLEMENTS_IOS_MANUAL_SANDBOXING_ = $(CODE_SIGN_ENTITLEMENTS_IOS_MANUAL_SANDBOXING_NO);
63 CODE_SIGN_ENTITLEMENTS_IOS_MANUAL_SANDBOXING_NO = Configurations/$(WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE).entitlements;
64 CODE_SIGN_ENTITLEMENTS_IOS_MANUAL_SANDBOXING_YES = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/$(WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE)-no-sandbox.entitlements;
65
66 WK_XPC_SERVICE_INSERT_LIBRARIES_DIR = $(WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_$(WK_RELOCATABLE_FRAMEWORKS));
67 WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_ = $(WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_NO);
68 WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_NO = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/Frameworks;
69 WK_XPC_SERVICE_INSERT_LIBRARIES_DIR_YES = @executable_path/$(WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORK)/Frameworks;
70
71 WK_LIBRARY_VALIDATION_ENABLED = $(WK_LIBRARY_VALIDATION_ENABLED_$(WK_EMPTY_$(WK_LIBRARY_VALIDATION_ENABLED)));
72 WK_LIBRARY_VALIDATION_ENABLED_ = $(WK_LIBRARY_VALIDATION_ENABLED_NO);
73 WK_LIBRARY_VALIDATION_ENABLED_NO = $(WK_LIBRARY_VALIDATION_ENABLED);
74 WK_LIBRARY_VALIDATION_ENABLED_YES = YES;
75
76 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS[sdk=macosx*] = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_$(WK_XPC_SERVICE_VARIANT));
77 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_ = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_Normal);
78 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_Normal = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_$(WK_LIBRARY_VALIDATION_ENABLED));
79 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_YES = -o library;