| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
| 6 import("//build/config/sysroot.gni") | 6 import("//build/config/sysroot.gni") |
| 7 import("//build/toolchain/toolchain.gni") | 7 import("//build/toolchain/toolchain.gni") |
| 8 | 8 |
| 9 declare_args() { | 9 declare_args() { |
| 10 # Enabling this option makes clang compile to an intermediate | 10 # Enabling this option makes clang compile to an intermediate |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 if (use_xcode_clang && get_path_info(ios_sdk_version, "name") != "10") { | 105 if (use_xcode_clang && get_path_info(ios_sdk_version, "name") != "10") { |
| 106 common_cc_flags = [ | 106 common_cc_flags = [ |
| 107 "-isystem", | 107 "-isystem", |
| 108 rebase_path("//third_party/llvm-build/Release+Asserts/include/c++/v1", | 108 rebase_path("//third_party/llvm-build/Release+Asserts/include/c++/v1", |
| 109 root_build_dir), | 109 root_build_dir), |
| 110 ] | 110 ] |
| 111 | 111 |
| 112 cflags_cc = common_cc_flags | 112 cflags_cc = common_cc_flags |
| 113 cflags_objcc = common_cc_flags | 113 cflags_objcc = common_cc_flags |
| 114 } | 114 } |
| 115 |
| 116 if (ios_enable_coverage) { |
| 117 configs = [ ":enable_coverage" ] |
| 118 } |
| 115 } | 119 } |
| 116 | 120 |
| 117 config("ios_executable_flags") { | 121 config("ios_executable_flags") { |
| 118 } | 122 } |
| 119 | 123 |
| 120 config("ios_dynamic_flags") { | 124 config("ios_dynamic_flags") { |
| 121 ldflags = [ "-Wl,-ObjC" ] # Always load Objective-C categories and class. | 125 ldflags = [ "-Wl,-ObjC" ] # Always load Objective-C categories and class. |
| 122 } | 126 } |
| 123 | 127 |
| 124 config("xctest_config") { | 128 config("xctest_config") { |
| 125 common_flags = [ | 129 common_flags = [ |
| 126 "-F", | 130 "-F", |
| 127 "$ios_sdk_platform_path/Developer/Library/Frameworks", | 131 "$ios_sdk_platform_path/Developer/Library/Frameworks", |
| 128 ] | 132 ] |
| 129 | 133 |
| 130 cflags = common_flags | 134 cflags = common_flags |
| 131 ldflags = common_flags | 135 ldflags = common_flags |
| 132 | 136 |
| 133 libs = [ | 137 libs = [ |
| 134 "Foundation.framework", | 138 "Foundation.framework", |
| 135 "XCTest.framework", | 139 "XCTest.framework", |
| 136 ] | 140 ] |
| 137 } | 141 } |
| 138 | 142 |
| 143 # This enables support for LLVM code coverage. See |
| 144 # http://llvm.org/docs/CoverageMappingFormat.html. |
| 145 config("enable_coverage") { |
| 146 cflags = [ |
| 147 "-fprofile-instr-generate", |
| 148 "-fcoverage-mapping", |
| 149 ] |
| 150 ldflags = [ "-fprofile-instr-generate" ] |
| 151 } |
| 152 |
| 139 group("xctest") { | 153 group("xctest") { |
| 140 public_configs = [ ":xctest_config" ] | 154 public_configs = [ ":xctest_config" ] |
| 141 } | 155 } |
| OLD | NEW |