From d802d488ea0591b2233271a9b25a9ce7eaffc3b1 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 7 Nov 2021 15:38:25 -0800 Subject: [PATCH] extract: Fix and simplify DSP file naming --- src/build/soong.ts | 2 ++ src/commands/extract.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/build/soong.ts b/src/build/soong.ts index 9eb8880..e97798d 100644 --- a/src/build/soong.ts +++ b/src/build/soong.ts @@ -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 diff --git a/src/commands/extract.ts b/src/commands/extract.ts index 68e0869..c2629e5 100644 --- a/src/commands/extract.ts +++ b/src/commands/extract.ts @@ -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