extract: Fix and simplify DSP file naming

This commit is contained in:
Danny Lin 2021-11-07 15:38:25 -08:00
parent 91eac475fc
commit d802d488ea
2 changed files with 3 additions and 1 deletions

View file

@ -70,6 +70,7 @@ export interface EtcXmlModule {
export interface DspModule {
src: string
filename_from_src: boolean
sub_dir?: string
}
@ -145,6 +146,7 @@ export function blobToSoongModule(
moduleSpecific = {
_type: 'prebuilt_dsp',
src: entry.srcPath,
filename_from_src: true,
...(relPath && { sub_dir: relPath }),
}
// Then other extension-based types

View file

@ -39,7 +39,7 @@ async function generateBuild(
// Named dependencies -> Soong blueprint
// Module name = file name, excluding extension if it was used
let baseExt = (SPECIAL_FILE_EXTENSIONS.has(ext) && pathParts[0] != 'dsp') ? ext : undefined
let baseExt = SPECIAL_FILE_EXTENSIONS.has(ext) ? ext : undefined
let name = path.basename(entry.path, baseExt)
// If already exists: skip if it's the other arch variant of a library in