Merge "Install etc files with VSDK" am: 53f2c95791 am: 396449cfd3
Original change: https://android-review.googlesource.com/c/platform/development/+/1781807 Change-Id: I2c941b1fcfe29059b0035790a51083dc871b78f6
This commit is contained in:
@@ -107,6 +107,8 @@ JSON_TO_BP = {
|
|||||||
'StaticLibs': 'static_libs',
|
'StaticLibs': 'static_libs',
|
||||||
'RuntimeLibs': 'runtime_libs',
|
'RuntimeLibs': 'runtime_libs',
|
||||||
'Required': 'required',
|
'Required': 'required',
|
||||||
|
'Filename': 'filename',
|
||||||
|
'RelativeInstallPath': 'relative_install_path',
|
||||||
}
|
}
|
||||||
|
|
||||||
SANITIZER_VARIANT_PROPS = {
|
SANITIZER_VARIANT_PROPS = {
|
||||||
@@ -174,13 +176,17 @@ def gen_bp_module(image, variation, name, version, target_arch, vndk_list, arch_
|
|||||||
# If a vndk library with the same name exists, reuses exported flags of the vndk library,
|
# If a vndk library with the same name exists, reuses exported flags of the vndk library,
|
||||||
# instead of the snapshot's own flags.
|
# instead of the snapshot's own flags.
|
||||||
prop = {
|
prop = {
|
||||||
# These three are common for all snapshot modules.
|
# These are common for all snapshot modules.
|
||||||
'version': str(version),
|
|
||||||
'target_arch': target_arch,
|
|
||||||
image: True,
|
image: True,
|
||||||
'arch': {},
|
'arch': {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if variation != 'etc':
|
||||||
|
prop['version'] = str(version)
|
||||||
|
prop['target_arch'] = target_arch
|
||||||
|
else:
|
||||||
|
prop['prefer'] = True
|
||||||
|
|
||||||
reexport_vndk_name = name
|
reexport_vndk_name = name
|
||||||
if reexport_vndk_name == "libc++_static":
|
if reexport_vndk_name == "libc++_static":
|
||||||
reexport_vndk_name = "libc++"
|
reexport_vndk_name = "libc++"
|
||||||
@@ -231,7 +237,7 @@ def gen_bp_module(image, variation, name, version, target_arch, vndk_list, arch_
|
|||||||
|
|
||||||
# header snapshots doesn't need compile_multilib. The other snapshots,
|
# header snapshots doesn't need compile_multilib. The other snapshots,
|
||||||
# shared/static/object/binary snapshots, do need them
|
# shared/static/object/binary snapshots, do need them
|
||||||
if variation != 'header':
|
if variation != 'header' and variation != 'etc':
|
||||||
if has32 and has64:
|
if has32 and has64:
|
||||||
prop['compile_multilib'] = 'both'
|
prop['compile_multilib'] = 'both'
|
||||||
elif has32:
|
elif has32:
|
||||||
@@ -246,7 +252,14 @@ def gen_bp_module(image, variation, name, version, target_arch, vndk_list, arch_
|
|||||||
if variation == 'binary' and stem32 == stem64:
|
if variation == 'binary' and stem32 == stem64:
|
||||||
prop['compile_multilib'] = 'first'
|
prop['compile_multilib'] = 'first'
|
||||||
|
|
||||||
bp = '%s_snapshot_%s {\n' % (image, variation)
|
module_type = ''
|
||||||
|
|
||||||
|
if variation == 'etc':
|
||||||
|
module_type = 'snapshot_etc'
|
||||||
|
else:
|
||||||
|
module_type = '%s_snapshot_%s' % (image, variation)
|
||||||
|
|
||||||
|
bp = module_type + ' {\n'
|
||||||
bp += gen_bp_prop(prop, INDENT)
|
bp += gen_bp_prop(prop, INDENT)
|
||||||
bp += '}\n\n'
|
bp += '}\n\n'
|
||||||
return bp
|
return bp
|
||||||
@@ -307,14 +320,15 @@ def gen_bp_list_module(image, snapshot_version, vndk_list, target_arch, arch_pro
|
|||||||
# arch_props structure: arch_props[variant][module_name][arch]
|
# arch_props structure: arch_props[variant][module_name][arch]
|
||||||
# e.g. arch_props['shared']['libc++']['x86']
|
# e.g. arch_props['shared']['libc++']['x86']
|
||||||
for variant in arch_props:
|
for variant in arch_props:
|
||||||
variant_name = variant_to_property[variant]
|
if variant in variant_to_property:
|
||||||
for name in arch_props[variant]:
|
variant_name = variant_to_property[variant]
|
||||||
for arch in arch_props[variant][name]:
|
for name in arch_props[variant]:
|
||||||
if arch not in arch_bp_prop:
|
for arch in arch_props[variant][name]:
|
||||||
arch_bp_prop[arch] = dict()
|
if arch not in arch_bp_prop:
|
||||||
if variant_name not in arch_bp_prop[arch]:
|
arch_bp_prop[arch] = dict()
|
||||||
arch_bp_prop[arch][variant_name] = []
|
if variant_name not in arch_bp_prop[arch]:
|
||||||
arch_bp_prop[arch][variant_name].append(name)
|
arch_bp_prop[arch][variant_name] = []
|
||||||
|
arch_bp_prop[arch][variant_name].append(name)
|
||||||
|
|
||||||
bp_props['arch'] = arch_bp_prop
|
bp_props['arch'] = arch_bp_prop
|
||||||
bp += gen_bp_prop(bp_props, INDENT)
|
bp += gen_bp_prop(bp_props, INDENT)
|
||||||
|
|||||||
Reference in New Issue
Block a user