| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 # HOW TO WRITE CONDITIONALS IN THIS FILE | 5 # HOW TO WRITE CONDITIONALS IN THIS FILE |
| 6 # ====================================== | 6 # ====================================== |
| 7 # | 7 # |
| 8 # In many other places, one would write a conditional that expresses all the | 8 # In many other places, one would write a conditional that expresses all the |
| 9 # cases when a source file is used or unused, and then either add or subtract | 9 # cases when a source file is used or unused, and then either add or subtract |
| 10 # it from the sources list in that case | 10 # it from the sources list in that case |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 # small parts of it are used in many different contexts. This combined with a | 102 # small parts of it are used in many different contexts. This combined with a |
| 103 # few static initializers floating around means that dead code stripping | 103 # few static initializers floating around means that dead code stripping |
| 104 # still leaves a lot of code behind that isn't always used. For example, this | 104 # still leaves a lot of code behind that isn't always used. For example, this |
| 105 # saves more than 40K for a smaller target like chrome_elf. | 105 # saves more than 40K for a smaller target like chrome_elf. |
| 106 # | 106 # |
| 107 # Use static libraries for the helper stuff as well like //base/debug since | 107 # Use static libraries for the helper stuff as well like //base/debug since |
| 108 # those things refer back to base code, which will force base compilation units | 108 # those things refer back to base code, which will force base compilation units |
| 109 # to be linked in where they wouldn't have otherwise. This does not include | 109 # to be linked in where they wouldn't have otherwise. This does not include |
| 110 # test code (test support and anything in the test directory) which should use | 110 # test code (test support and anything in the test directory) which should use |
| 111 # source_set as is recommended for GN targets). | 111 # source_set as is recommended for GN targets). |
| 112 if (is_component_build) { | 112 component("base") { |
| 113 base_target_type = "shared_library" | |
| 114 } else { | |
| 115 # TODO(phosek) bug 570839: If field_trial.cc is in a static library, | 113 # TODO(phosek) bug 570839: If field_trial.cc is in a static library, |
| 116 # hacl_helper_nonsfi doesn't link properly on Linux in debug builds. The | 114 # hacl_helper_nonsfi doesn't link properly on Linux in debug builds. The |
| 117 # reasons for this seem to involve obscure toolchain bugs. This should be | 115 # reasons for this seem to involve obscure toolchain bugs. This should be |
| 118 # fixed and this target should always be a static_library in the | 116 # fixed and this target should always be a static_library in the |
| 119 # non-component case. | 117 # non-component case. |
| 120 if (is_nacl_nonsfi) { | 118 component_never_use_source_set = !is_nacl_nonsfi |
| 121 base_target_type = "source_set" | 119 |
| 122 } else { | |
| 123 base_target_type = "static_library" | |
| 124 } | |
| 125 } | |
| 126 target(base_target_type, "base") { | |
| 127 sources = [ | 120 sources = [ |
| 128 "allocator/allocator_extension.cc", | 121 "allocator/allocator_extension.cc", |
| 129 "allocator/allocator_extension.h", | 122 "allocator/allocator_extension.h", |
| 130 "android/animation_frame_time_histogram.cc", | 123 "android/animation_frame_time_histogram.cc", |
| 131 "android/animation_frame_time_histogram.h", | 124 "android/animation_frame_time_histogram.h", |
| 132 "android/apk_assets.cc", | 125 "android/apk_assets.cc", |
| 133 "android/apk_assets.h", | 126 "android/apk_assets.h", |
| 134 "android/application_status_listener.cc", | 127 "android/application_status_listener.cc", |
| 135 "android/application_status_listener.h", | 128 "android/application_status_listener.h", |
| 136 "android/base_jni_onload.cc", | 129 "android/base_jni_onload.cc", |
| (...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2147 | 2140 |
| 2148 # GYP: //base.gyp:base_java_unittest_support | 2141 # GYP: //base.gyp:base_java_unittest_support |
| 2149 android_library("base_java_unittest_support") { | 2142 android_library("base_java_unittest_support") { |
| 2150 deps = [ | 2143 deps = [ |
| 2151 ":base_java", | 2144 ":base_java", |
| 2152 ] | 2145 ] |
| 2153 java_files = | 2146 java_files = |
| 2154 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] | 2147 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] |
| 2155 } | 2148 } |
| 2156 } | 2149 } |
| OLD | NEW |