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

Side by Side Diff: build/config/android/rules.gni

Issue 1696803002: Add a variable indicating the target as Android M or later. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//base/android/linker/config.gni") 5 import("//base/android/linker/config.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/internal_rules.gni") 7 import("//build/config/android/internal_rules.gni")
8 import("//build/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 import("//build/toolchain/toolchain.gni") 9 import("//build/toolchain/toolchain.gni")
10 import("//third_party/android_platform/config.gni") 10 import("//third_party/android_platform/config.gni")
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 # (optional). 1225 # (optional).
1226 # apk_under_test: For an instrumentation test apk, this is the target of the 1226 # apk_under_test: For an instrumentation test apk, this is the target of the
1227 # tested apk. 1227 # tested apk.
1228 # include_all_resources - If true include all resource IDs in all generated 1228 # include_all_resources - If true include all resource IDs in all generated
1229 # R.java files. 1229 # R.java files.
1230 # testonly: Marks this target as "test-only". 1230 # testonly: Marks this target as "test-only".
1231 # write_asset_list: Adds an extra file to the assets, which contains a list of 1231 # write_asset_list: Adds an extra file to the assets, which contains a list of
1232 # all other asset files. 1232 # all other asset files.
1233 # alternative_locale_resource_dep: The locale resource target which overrides 1233 # alternative_locale_resource_dep: The locale resource target which overrides
1234 # any exsting locale resources in dep graph. 1234 # any exsting locale resources in dep graph.
1235 # requires_sdk_api_level_23: If defined and true, the apk is intended for
1236 # installation only on Android M or later. In these releases the system
1237 # linker does relocation unpacking, so we can enable it unconditionally.
1235 # 1238 #
1236 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in 1239 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in
1237 # this directory will be included in the library. This is only supported to 1240 # this directory will be included in the library. This is only supported to
1238 # ease the gyp->gn conversion and will be removed in the future. 1241 # ease the gyp->gn conversion and will be removed in the future.
1239 # 1242 #
1240 # Example 1243 # Example
1241 # android_apk("foo_apk") { 1244 # android_apk("foo_apk") {
1242 # android_manifest = "AndroidManifest.xml" 1245 # android_manifest = "AndroidManifest.xml"
1243 # java_files = [ 1246 # java_files = [
1244 # "android/org/chromium/foo/FooApplication.java", 1247 # "android/org/chromium/foo/FooApplication.java",
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 chromium_linker_supported 1332 chromium_linker_supported
1330 _enable_relocation_packing = 1333 _enable_relocation_packing =
1331 defined(invoker.enable_relocation_packing) && 1334 defined(invoker.enable_relocation_packing) &&
1332 invoker.enable_relocation_packing && _use_chromium_linker 1335 invoker.enable_relocation_packing && _use_chromium_linker
1333 _load_library_from_apk = 1336 _load_library_from_apk =
1334 defined(invoker.load_library_from_apk) && invoker.load_library_from_apk 1337 defined(invoker.load_library_from_apk) && invoker.load_library_from_apk
1335 1338
1336 assert(_use_chromium_linker || true) # Mark as used. 1339 assert(_use_chromium_linker || true) # Mark as used.
1337 assert(_enable_relocation_packing || true) # Mark as used. 1340 assert(_enable_relocation_packing || true) # Mark as used.
1338 1341
1339 assert( 1342 assert(!_load_library_from_apk || _use_chromium_linker,
1340 !_load_library_from_apk || _use_chromium_linker, 1343 "Loading library from the apk requires use of the Chromium linker.")
Torne 2016/02/16 15:46:56 It's okay to load library from APK if it's sdk 23+
simonb (inactive) 2016/02/16 16:54:08 Yes, but at present only if the chromium linker is
Torne 2016/02/16 17:58:49 OK.
1341 "Loading library from the apk requires use" + " of the Chromium linker.") 1344
1345 # If the apk is for Android M or later, always enable relocation packing.
1346 if (defined(invoker.requires_sdk_api_level_23) &&
Torne 2016/02/16 15:46:56 Can we just make this setting work like the other
simonb (inactive) 2016/02/16 16:54:08 The assert condition that the linker supports unpa
Torne 2016/02/16 17:58:49 No, I mean, can we just make the *logic* work the
1347 invoker.requires_sdk_api_level_23) {
1348 _enable_relocation_packing = true
1349 }
1342 1350
1343 # The dependency that makes the chromium linker, if any is needed. 1351 # The dependency that makes the chromium linker, if any is needed.
1344 _native_libs_deps = [] 1352 _native_libs_deps = []
1345 1353
1346 if (defined(invoker.native_libs) && invoker.native_libs != []) { 1354 if (defined(invoker.native_libs) && invoker.native_libs != []) {
1347 if (is_component_build || is_asan) { 1355 if (is_component_build || is_asan) {
1348 _native_libs += [ "$root_shlib_dir/libc++_shared.so" ] 1356 _native_libs += [ "$root_shlib_dir/libc++_shared.so" ]
1349 _native_libs_deps += [ "//build/android:cpplib_stripped" ] 1357 _native_libs_deps += [ "//build/android:cpplib_stripped" ]
1350 } 1358 }
1351 1359
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 } 2328 }
2321 2329
2322 android_library(target_name) { 2330 android_library(target_name) {
2323 java_files = [] 2331 java_files = []
2324 srcjar_deps = [ ":${_template_name}__protoc_java" ] 2332 srcjar_deps = [ ":${_template_name}__protoc_java" ]
2325 deps = [ 2333 deps = [
2326 "//third_party/android_protobuf:protobuf_nano_javalib", 2334 "//third_party/android_protobuf:protobuf_nano_javalib",
2327 ] 2335 ]
2328 } 2336 }
2329 } 2337 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698