diff --git a/src/build/llvmPackages.ts b/src/build/llvmPackages.ts index 76de635..390ed3e 100644 --- a/src/build/llvmPackages.ts +++ b/src/build/llvmPackages.ts @@ -57,11 +57,7 @@ export interface LLVMPackageOptions { /** * Build directories suitable for these three packages. */ - buildDirs: { - llvm: string; - cflang: string; - libpgmath: string; - }; + buildDir: (packageName: 'llvm' | 'libpgmath' | 'cflang') => string, platform: PackagePlatform; }; @@ -70,7 +66,7 @@ export function llvmPackages({ src, installPrefix, platform, - buildDirs, + buildDir, cmakeDefinitionOverrides, spawnOverrides, }: LLVMPackageOptions & LLVMPackageOverrides): PackageTask[] { @@ -110,7 +106,7 @@ export function llvmPackages({ }); function mkLLVMPackage(): PackageTask { - const build = buildDirs.llvm; + const build = buildDir('llvm'); return { name: "llvm", platform, @@ -145,7 +141,7 @@ export function llvmPackages({ } function mkLibpgmathPackage(): PackageTask { - const build = buildDirs.libpgmath; + const build = buildDir('libpgmath'); return { name: "libpgmath", configurePhase: async () => { @@ -174,7 +170,7 @@ export function llvmPackages({ } function mkCflangPackage(): PackageTask { - const build = buildDirs.cflang; + const build = buildDir('cflang'); return { name: "cflang", configurePhase: async () => {