| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import("//build/config/mac/mac_sdk.gni") | 5 import("//build/config/mac/mac_sdk.gni") |
| 6 | 6 |
| 7 if (current_toolchain == host_toolchain) { | 7 if (current_toolchain == host_toolchain) { |
| 8 config("config") { | |
| 9 visibility = [ ":iossim" ] | |
| 10 | |
| 11 include_dirs = [ "$root_gen_dir/iossim" ] | |
| 12 | |
| 13 # -objectForKeyedSubscript requires 10.8 or newer. Remove this override once | |
| 14 # the global version of the SDK is raised. | |
| 15 common_flags = [ "-mmacosx-version-min=10.8" ] | |
| 16 ldflags = common_flags | |
| 17 cflags_objcc = common_flags | |
| 18 } | |
| 19 | |
| 20 executable("iossim") { | 8 executable("iossim") { |
| 21 sources = [ | 9 sources = [ |
| 22 "iossim.mm", | 10 "iossim.mm", |
| 23 ] | 11 ] |
| 24 libs = [ "Foundation.framework" ] | 12 libs = [ "Foundation.framework" ] |
| 25 configs += [ ":config" ] | |
| 26 } | 13 } |
| 27 } else if (current_toolchain == default_toolchain) { | 14 } else if (current_toolchain == default_toolchain) { |
| 28 copy("iossim") { | 15 copy("iossim") { |
| 29 deps = [ | 16 deps = [ |
| 30 ":iossim($host_toolchain)", | 17 ":iossim($host_toolchain)", |
| 31 ] | 18 ] |
| 32 outputs = [ | 19 outputs = [ |
| 33 "$root_out_dir/iossim", | 20 "$root_out_dir/iossim", |
| 34 ] | 21 ] |
| 35 sources = [ | 22 sources = [ |
| 36 get_label_info(":iossim($host_toolchain)", "root_out_dir") + "/iossim", | 23 get_label_info(":iossim($host_toolchain)", "root_out_dir") + "/iossim", |
| 37 ] | 24 ] |
| 38 } | 25 } |
| 39 } | 26 } |
| OLD | NEW |