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.
7 ['OS!="ios" or "<(GENERATOR)"=="ninja"', {
10 'target_name': 'iossim',
14 'developer_dir': '<!(xcode-select -print-path)',
15 # TODO(lliabraa): Once all builders are on Xcode 6 this variable can
16 # be removed and the actions gated by this variable can be run by
17 # default (crbug.com/385030).
18 'xcode_version': '<!(xcodebuild -version | grep Xcode | awk \'{print $2}\')',
21 ['xcode_version>="6.0"', {
23 'iphone_sim_path': '<(developer_dir)/../SharedFrameworks',
29 # The CoreSimulator.h file generated by class-dump defines a
30 # property of type |NSString*| and a setter for the property
31 # that takes a parameter of type |id|. This type mismatch causes
32 # a compiler warning, so turn off -Werror.
33 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
37 'action_name': 'generate_dvt_foundation_header',
39 '<(iphone_sim_path)/DVTFoundation.framework/Versions/Current/DVTFoundation',
40 '<(PRODUCT_DIR)/class-dump',
43 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h'
46 # Actions don't provide a way to redirect stdout, so a custom
47 # script is invoked that will execute the first argument and
48 # write the output to the file specified as the second argument.
49 # -I sorts classes, categories, and protocols by inheritance.
50 # -C <regex> only displays classes matching regular expression.
51 './redirect-stdout.sh',
52 '<(PRODUCT_DIR)/class-dump -CDVTStackBacktrace|DVTInvalidation|DVTMixIn <(iphone_sim_path)/DVTFoundation.framework',
53 '<(INTERMEDIATE_DIR)/iossim/DVTFoundation.h',
55 'message': 'Generating DVTFoundation.h',
58 'action_name': 'generate_dvt_core_simulator',
60 '<(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/Current/CoreSimulator',
61 '<(PRODUCT_DIR)/class-dump',
64 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h'
67 # Actions don't provide a way to redirect stdout, so a custom
68 # script is invoked that will execute the first argument and
69 # write the output to the file specified as the second argument.
70 # -I sorts classes, categories, and protocols by inheritance.
71 # -C <regex> only displays classes matching regular expression.
72 './redirect-stdout.sh',
73 '<(PRODUCT_DIR)/class-dump -CSim <(developer_dir)/Library/PrivateFrameworks/CoreSimulator.framework',
74 '<(INTERMEDIATE_DIR)/iossim/CoreSimulator.h',
76 'message': 'Generating CoreSimulator.h',
79 }, { # else: xcode_version<"6.0"
81 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
86 'third_party/class-dump/class-dump.gyp:class-dump#host',
89 '<(INTERMEDIATE_DIR)/iossim',
93 '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
96 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
100 'action_name': 'generate_dvt_iphone_sim_header',
102 '<(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework/Versions/Current/DVTiPhoneSimulatorRemoteClient',
103 '<(PRODUCT_DIR)/class-dump',
106 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h'
109 # Actions don't provide a way to redirect stdout, so a custom
110 # script is invoked that will execute the first argument and
111 # write the output to the file specified as the second argument.
112 # -I sorts classes, categories, and protocols by inheritance.
113 # -C <regex> only displays classes matching regular expression.
114 './redirect-stdout.sh',
115 '<(PRODUCT_DIR)/class-dump -I -CiPhoneSimulator <(iphone_sim_path)/DVTiPhoneSimulatorRemoteClient.framework',
116 '<(INTERMEDIATE_DIR)/iossim/DVTiPhoneSimulatorRemoteClient.h',
118 'message': 'Generating DVTiPhoneSimulatorRemoteClient.h',
124 '-Wno-objc-property-no-attribute',
129 }, { # else, OS=="ios" and "<(GENERATOR)"!="ninja"
131 'ninja_output_dir': 'ninja-iossim',
133 '$(SYMROOT)/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
137 'target_name': 'iossim',
139 'toolsets': ['host'],
143 'testing/iossim/iossim.gyp',
146 'includes': ['../../build/ios/mac_build.gypi'],
149 'action_name': 'compile iossim',
156 'message': 'Generating the iossim executable',