OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'mac_deployment_target': '10.9', | 7 'mac_deployment_target': '10.9', |
8 'mac_sdk_min': '10.9', | 8 'mac_sdk_min': '10.9', |
9 'class_dump_bin': '<(PRODUCT_DIR)/class-dump', | 9 'class_dump_bin': '<(PRODUCT_DIR)/class-dump', |
10 'class_dump_py': '<(DEPTH)/third_party/class-dump/class-dump.py', | 10 'class_dump_py': '<(DEPTH)/third_party/class-dump/class-dump.py', |
11 }, | 11 }, |
12 'conditions': [ | 12 'targets': [ |
13 ['OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { | 13 { |
14 'targets': [ | 14 # GN version //testing/iossim(//build/toolchain/mac:clang_x64) |
| 15 'target_name': 'iossim', |
| 16 'toolsets': ['host'], |
| 17 'type': 'executable', |
| 18 'variables': { |
| 19 'developer_dir': '<!(xcode-select -print-path)', |
| 20 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks', |
| 21 }, |
| 22 'dependencies': [ |
| 23 '<(DEPTH)/third_party/class-dump/class-dump.gyp:class-dump#host', |
| 24 ], |
| 25 'include_dirs': [ |
| 26 '<(INTERMEDIATE_DIR)/iossim', |
| 27 ], |
| 28 'sources': [ |
| 29 'iossim.mm', |
| 30 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', |
| 31 ], |
| 32 'libraries': [ |
| 33 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 34 ], |
| 35 'actions': [ |
15 { | 36 { |
16 # GN version //testing/iossim(//build/toolchain/mac:clang_x64) | 37 'action_name': 'generate_dvt_core_simulator', |
17 'target_name': 'iossim', | 38 'inputs': [ |
18 'toolsets': ['host'], | 39 '<(class_dump_bin)', |
19 'type': 'executable', | 40 '<(class_dump_py)', |
20 'variables': { | 41 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework/
Versions/Current/CoreSimulator', |
21 'developer_dir': '<!(xcode-select -print-path)', | |
22 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks', | |
23 }, | |
24 'dependencies': [ | |
25 '<(DEPTH)/third_party/class-dump/class-dump.gyp:class-dump#host', | |
26 ], | 42 ], |
27 'include_dirs': [ | 43 'outputs': [ |
28 '<(INTERMEDIATE_DIR)/iossim', | 44 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h' |
29 ], | 45 ], |
30 'sources': [ | 46 'action': [ |
31 'iossim.mm', | 47 'python', |
32 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', | 48 '<(class_dump_py)', |
| 49 '-t', '<(class_dump_bin)', |
| 50 '-o', '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h', |
| 51 '--', |
| 52 '-CSim', |
| 53 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework'
, |
33 ], | 54 ], |
34 'libraries': [ | 55 'message': 'Generating CoreSimulator.h', |
35 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | 56 }, |
| 57 { |
| 58 'action_name': 'generate_dvt_foundation_header', |
| 59 'inputs': [ |
| 60 '<(class_dump_bin)', |
| 61 '<(class_dump_py)', |
| 62 '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVTFoun
dation', |
36 ], | 63 ], |
37 'actions': [ | 64 'outputs': [ |
38 { | 65 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h' |
39 'action_name': 'generate_dvt_core_simulator', | 66 ], |
40 'inputs': [ | 67 'action': [ |
41 '<(class_dump_bin)', | 68 'python', |
42 '<(class_dump_py)', | 69 '<(class_dump_py)', |
43 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framew
ork/Versions/Current/CoreSimulator', | 70 '-t', '<(class_dump_bin)', |
44 ], | 71 '-o', '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h', |
45 'outputs': [ | 72 '--', |
46 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h' | 73 '-CDVTStackBacktrace|DVTInvalidation|DVTMixIn', |
47 ], | 74 '<(iphone_sim_path)/DVTFoundation.framework', |
48 'action': [ | 75 ], |
49 'python', | 76 'message': 'Generating DVTFoundation.h', |
50 '<(class_dump_py)', | |
51 '-t', '<(class_dump_bin)', | |
52 '-o', '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h', | |
53 '--', | |
54 '-CSim', | |
55 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framew
ork', | |
56 ], | |
57 'message': 'Generating CoreSimulator.h', | |
58 }, | |
59 { | |
60 'action_name': 'generate_dvt_foundation_header', | |
61 'inputs': [ | |
62 '<(class_dump_bin)', | |
63 '<(class_dump_py)', | |
64 '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVT
Foundation', | |
65 ], | |
66 'outputs': [ | |
67 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h' | |
68 ], | |
69 'action': [ | |
70 'python', | |
71 '<(class_dump_py)', | |
72 '-t', '<(class_dump_bin)', | |
73 '-o', '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h', | |
74 '--', | |
75 '-CDVTStackBacktrace|DVTInvalidation|DVTMixIn', | |
76 '<(iphone_sim_path)/DVTFoundation.framework', | |
77 ], | |
78 'message': 'Generating DVTFoundation.h', | |
79 }, | |
80 { | |
81 'action_name': 'generate_dvt_iphone_sim_header', | |
82 'inputs': [ | |
83 '<(class_dump_bin)', | |
84 '<(class_dump_py)', | |
85 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Ver
sions/Current/DVTiPhoneSimulatorRemoteClient', | |
86 ], | |
87 'outputs': [ | |
88 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h' | |
89 ], | |
90 'action': [ | |
91 'python', | |
92 '<(class_dump_py)', | |
93 '-t', '<(class_dump_bin)', | |
94 '-o', '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient
.h', | |
95 '--', | |
96 '-I', | |
97 '-CiPhoneSimulator', | |
98 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework', | |
99 ], | |
100 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h', | |
101 }, | |
102 ], # actions | |
103 'xcode_settings': { | |
104 'ARCHS': ['x86_64'], | |
105 }, | |
106 }, | 77 }, |
107 ], | 78 { |
108 }, { # else, OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)
"!="ninja" | 79 'action_name': 'generate_dvt_iphone_sim_header', |
109 'variables': { | 80 'inputs': [ |
110 'ninja_output_dir': 'ninja-iossim', | 81 '<(class_dump_bin)', |
111 'ninja_product_dir': | 82 '<(class_dump_py)', |
112 '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)', | 83 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Version
s/Current/DVTiPhoneSimulatorRemoteClient', |
| 84 ], |
| 85 'outputs': [ |
| 86 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h' |
| 87 ], |
| 88 'action': [ |
| 89 'python', |
| 90 '<(class_dump_py)', |
| 91 '-t', '<(class_dump_bin)', |
| 92 '-o', '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h', |
| 93 '--', |
| 94 '-I', |
| 95 '-CiPhoneSimulator', |
| 96 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework', |
| 97 ], |
| 98 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h', |
| 99 }, |
| 100 ], # actions |
| 101 'xcode_settings': { |
| 102 'ARCHS': ['x86_64'], |
113 }, | 103 }, |
114 'targets': [ | 104 }, |
115 { | |
116 'target_name': 'iossim', | |
117 'type': 'none', | |
118 'toolsets': ['host'], | |
119 'variables': { | |
120 # Gyp to rerun | |
121 're_run_targets': [ | |
122 'testing/iossim/iossim.gyp', | |
123 ], | |
124 }, | |
125 'includes': ['../../build/ios/mac_build.gypi'], | |
126 'actions': [ | |
127 { | |
128 'action_name': 'compile iossim', | |
129 'inputs': [], | |
130 'outputs': [], | |
131 'action': [ | |
132 '<@(ninja_cmd)', | |
133 'iossim', | |
134 ], | |
135 'message': 'Generating the iossim executable', | |
136 }, | |
137 ], | |
138 }, | |
139 ], | |
140 }], | |
141 ], | 105 ], |
142 } | 106 } |
OLD | NEW |