Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: testing/iossim/BUILD.gn

Issue 1882843002: [GN/iOS] Create a symlink to iossim for compatibility with gyp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-iossim
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/ios/rules.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/iossim/BUILD.gn
diff --git a/testing/iossim/BUILD.gn b/testing/iossim/BUILD.gn
index a31fdcbfae09d7c4594c035e4c8386b934936938..25c5f6498d22d6ad106d0688a8a85fb0c637302f 100644
--- a/testing/iossim/BUILD.gn
+++ b/testing/iossim/BUILD.gn
@@ -3,54 +3,63 @@
# found in the LICENSE file.
import("//build/config/mac/mac_sdk.gni")
+import("//build/symlink.gni")
import("//third_party/class-dump/class-dump.gni")
-config("config") {
- visibility = [ ":iossim" ]
+if (current_toolchain == host_toolchain) {
+ config("config") {
+ visibility = [ ":iossim" ]
- include_dirs = [ "$root_gen_dir/iossim" ]
+ include_dirs = [ "$root_gen_dir/iossim" ]
- # TODO(crbug.com/595295): Building class-dump tools requires OS X SDK
- # version 10.9 or higher. Remove this override once the global version
- # of the SDK is raised.
- common_flags = [ "-mmacosx-version-min=10.9" ]
- ldflags = common_flags
- cflags_objcc = common_flags
-}
+ # TODO(crbug.com/595295): Building class-dump tools requires OS X SDK
+ # version 10.9 or higher. Remove this override once the global version
+ # of the SDK is raised.
+ common_flags = [ "-mmacosx-version-min=10.9" ]
+ ldflags = common_flags
+ cflags_objcc = common_flags
+ }
-executable("iossim") {
- sources = [
- "iossim.mm",
- ]
- libs = [ "Foundation.framework" ]
- deps = [
- ":generate_dvt_core_simulator",
- ":generate_dvt_foundation_header",
- ":generate_dvt_iphone_sim_header",
- ]
- configs += [ ":config" ]
-
- # TODO(crbug.com/595295): Building class-dump tools requires OS X SDK
- # version 10.9 or higher. To prevent mixing code using different value
- # of minimum SDK supported, forbids dependencies on any Chromium target.
- assert_no_deps = [ "//base/*" ]
-}
+ executable("iossim") {
+ sources = [
+ "iossim.mm",
+ ]
+ libs = [ "Foundation.framework" ]
+ deps = [
+ ":generate_dvt_core_simulator",
+ ":generate_dvt_foundation_header",
+ ":generate_dvt_iphone_sim_header",
+ ]
+ configs += [ ":config" ]
-class_dump("generate_dvt_core_simulator") {
- framework_name = "CoreSimulator"
- framework_path = "$mac_sdk_path/../../../../../Library/PrivateFrameworks"
- class_dump_filter = "Sim"
-}
+ # TODO(crbug.com/595295): Building class-dump tools requires OS X SDK
+ # version 10.9 or higher. To prevent mixing code using different value
+ # of minimum SDK supported, forbids dependencies on any Chromium target.
+ assert_no_deps = [ "//base/*" ]
+ }
-class_dump("generate_dvt_foundation_header") {
- framework_name = "DVTFoundation"
- framework_path = "$mac_sdk_path/../../../../../../SharedFrameworks"
- class_dump_filter = "DVTStackBacktrace|DVTInvalidation|DVTMixIn"
-}
+ class_dump("generate_dvt_core_simulator") {
+ framework_name = "CoreSimulator"
+ framework_path = "$mac_sdk_path/../../../../../Library/PrivateFrameworks"
+ class_dump_filter = "Sim"
+ }
+
+ class_dump("generate_dvt_foundation_header") {
+ framework_name = "DVTFoundation"
+ framework_path = "$mac_sdk_path/../../../../../../SharedFrameworks"
+ class_dump_filter = "DVTStackBacktrace|DVTInvalidation|DVTMixIn"
+ }
-class_dump("generate_dvt_iphone_sim_header") {
- topological_sort = true
- framework_name = "DVTiPhoneSimulatorRemoteClient"
- framework_path = "$mac_sdk_path/../../../../../../SharedFrameworks"
- class_dump_filter = "iPhoneSimulator"
+ class_dump("generate_dvt_iphone_sim_header") {
+ topological_sort = true
+ framework_name = "DVTiPhoneSimulatorRemoteClient"
+ framework_path = "$mac_sdk_path/../../../../../../SharedFrameworks"
+ class_dump_filter = "iPhoneSimulator"
+ }
+} else if (current_toolchain == default_toolchain) {
+ binary_symlink("iossim") {
+ # This creates an 'iossim' target in root_build_dir for compatibility
+ # with GYP and the test scripts.
+ binary_label = ":iossim($host_toolchain)"
+ }
}
« no previous file with comments | « build/config/ios/rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698