Update V8 to version 4.7.24.
[chromium-blink-merge.git] / testing / iossim / iossim.gyp
blobc4a45b62a9795884aca6af3d78b11f8b08a754dc
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     'mac_deployment_target': '10.9',
8     'mac_sdk_min': '10.9',
9   },
10   'conditions': [
11     ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', {
12       'targets': [
13         {
14           'target_name': 'iossim',
15           'toolsets': ['host'],
16           'type': 'executable',
17           'variables': {
18             'developer_dir': '<!(xcode-select -print-path)',
19             # TODO(lliabraa): Once all builders are on Xcode 6 this variable can
20             # be removed and the actions gated by this variable can be run by
21             # default (crbug.com/385030).
22             'xcode_version': '<!(xcodebuild -version | grep Xcode | awk \'{print $2}\')',
23           },
24           'conditions': [
25             ['xcode_version>="6.0"', {
26               'variables': {
27                 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks',
28               },
29               'defines': [
30                 'IOSSIM_USE_XCODE_6',
31               ],
32               'actions': [
33                 {
34                   'action_name': 'generate_dvt_foundation_header',
35                   'inputs': [
36                     '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVTFoundation',
37                     '<(PRODUCT_DIR)/class-dump',
38                   ],
39                   'outputs': [
40                     '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h'
41                   ],
42                   'action': [
43                     # Actions don't provide a way to redirect stdout, so a custom
44                     # script is invoked that will execute the first argument and
45                     # write the output to the file specified as the second argument.
46                     # -I sorts classes, categories, and protocols by inheritance.
47                     # -C <regex> only displays classes matching regular expression.
48                     './redirect-stdout.sh',
49                     '<(PRODUCT_DIR)/class-dump -CDVTStackBacktrace|DVTInvalidation|DVTMixIn <(iphone_sim_path)/DVTFoundation.framework',
50                     '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h',
51                   ],
52                   'message': 'Generating DVTFoundation.h',
53                 },
54                 {
55                   'action_name': 'generate_dvt_core_simulator',
56                   'inputs': [
57                     '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/Current/CoreSimulator',
58                     '<(PRODUCT_DIR)/class-dump',
59                   ],
60                   'outputs': [
61                     '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h'
62                   ],
63                   'action': [
64                     # Actions don't provide a way to redirect stdout, so a custom
65                     # script is invoked that will execute the first argument and
66                     # write the output to the file specified as the second argument.
67                     # -I sorts classes, categories, and protocols by inheritance.
68                     # -C <regex> only displays classes matching regular expression.
69                     './redirect-stdout.sh',
70                     '<(PRODUCT_DIR)/class-dump -CSim <(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework',
71                     '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h',
72                   ],
73                   'message': 'Generating CoreSimulator.h',
74                 },
75               ],  # actions
76             }, {  # else: xcode_version<"6.0"
77               'variables': {
78                 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
79               },
80             }],  # xcode_version
81           ],  # conditions
82           'dependencies': [
83             '<(DEPTH)/third_party/class-dump/class-dump.gyp:class-dump#host',
84           ],
85           'include_dirs': [
86             '<(INTERMEDIATE_DIR)/iossim',
87           ],
88           'sources': [
89             'iossim.mm',
90             '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
91           ],
92           'libraries': [
93             '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
94           ],
95           'actions': [
96             {
97               'action_name': 'generate_dvt_iphone_sim_header',
98               'inputs': [
99                 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Versions/Current/DVTiPhoneSimulatorRemoteClient',
100                 '<(PRODUCT_DIR)/class-dump',
101               ],
102               'outputs': [
103                 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h'
104               ],
105               'action': [
106                 # Actions don't provide a way to redirect stdout, so a custom
107                 # script is invoked that will execute the first argument and
108                 # write the output to the file specified as the second argument.
109                 # -I sorts classes, categories, and protocols by inheritance.
110                 # -C <regex> only displays classes matching regular expression.
111                 './redirect-stdout.sh',
112                 '<(PRODUCT_DIR)/class-dump -I -CiPhoneSimulator <(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework',
113                 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h',
114               ],
115               'message': 'Generating DVTiPhoneSimulatorRemoteClient.h',
116             },
117           ],  # actions
118           'xcode_settings': {
119             'ARCHS': ['x86_64'],
120           },
121         },
122       ],
123     }, {  # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)"!="ninja"
124       'variables': {
125         'ninja_output_dir': 'ninja-iossim',
126         'ninja_product_dir':
127           '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
128       },
129       'targets': [
130         {
131           'target_name': 'iossim',
132           'type': 'none',
133           'toolsets': ['host'],
134           'variables': {
135             # Gyp to rerun
136             're_run_targets': [
137                'testing/iossim/iossim.gyp',
138             ],
139           },
140           'includes': ['../../build/ios/mac_build.gypi'],
141           'actions': [
142             {
143               'action_name': 'compile iossim',
144               'inputs': [],
145               'outputs': [],
146               'action': [
147                 '<@(ninja_cmd)',
148                 'iossim',
149               ],
150               'message': 'Generating the iossim executable',
151             },
152           ],
153         },
154       ],
155     }],
156   ],