Include 'name' in props; use post-sanitize module name.
In cases where not all the variants of a library are included in the generated vendor snapshot, be sure to include the module name in the props so that it can be factored out later. Conversely, be sure to compute the notice filename from the de-sanitized module name so so that it can also be factored out later. Bug: 171413810 Bug: 157967325 Test: Verify that full snapshot Android.bp unchanged. Test: Verify correct syntax for filtered snapshot. Change-Id: I5725e17b19907d6a5063823e8b99bd0517c7c144
This commit is contained in:
@@ -241,9 +241,6 @@ def build_props(install_dir):
|
||||
target_arch)
|
||||
|
||||
module_name = prop['name']
|
||||
notice_path = 'NOTICE_FILES/' + module_name + '.txt'
|
||||
if os.path.exists(os.path.join(bp_dir, notice_path)):
|
||||
prop['notice'] = notice_path
|
||||
|
||||
# Is this sanitized variant?
|
||||
if 'sanitize' in prop:
|
||||
@@ -254,7 +251,11 @@ def build_props(install_dir):
|
||||
for k in list(prop.keys()):
|
||||
if not k in SANITIZER_VARIANT_PROPS:
|
||||
del prop[k]
|
||||
prop = {sanitizer_type: prop}
|
||||
prop = {'name': module_name, sanitizer_type: prop}
|
||||
|
||||
notice_path = 'NOTICE_FILES/' + module_name + '.txt'
|
||||
if os.path.exists(os.path.join(bp_dir, notice_path)):
|
||||
prop['notice'] = notice_path
|
||||
|
||||
variation_dict = props[target_arch][variation]
|
||||
if not module_name in variation_dict:
|
||||
|
||||
Reference in New Issue
Block a user