build/llvmPackages: use a function to compute build directories
This commit is contained in:
@@ -57,11 +57,7 @@ export interface LLVMPackageOptions {
|
|||||||
/**
|
/**
|
||||||
* Build directories suitable for these three packages.
|
* Build directories suitable for these three packages.
|
||||||
*/
|
*/
|
||||||
buildDirs: {
|
buildDir: (packageName: 'llvm' | 'libpgmath' | 'cflang') => string,
|
||||||
llvm: string;
|
|
||||||
cflang: string;
|
|
||||||
libpgmath: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
platform: PackagePlatform;
|
platform: PackagePlatform;
|
||||||
};
|
};
|
||||||
@@ -70,7 +66,7 @@ export function llvmPackages({
|
|||||||
src,
|
src,
|
||||||
installPrefix,
|
installPrefix,
|
||||||
platform,
|
platform,
|
||||||
buildDirs,
|
buildDir,
|
||||||
cmakeDefinitionOverrides,
|
cmakeDefinitionOverrides,
|
||||||
spawnOverrides,
|
spawnOverrides,
|
||||||
}: LLVMPackageOptions & LLVMPackageOverrides): PackageTask[] {
|
}: LLVMPackageOptions & LLVMPackageOverrides): PackageTask[] {
|
||||||
@@ -110,7 +106,7 @@ export function llvmPackages({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function mkLLVMPackage(): PackageTask {
|
function mkLLVMPackage(): PackageTask {
|
||||||
const build = buildDirs.llvm;
|
const build = buildDir('llvm');
|
||||||
return {
|
return {
|
||||||
name: "llvm",
|
name: "llvm",
|
||||||
platform,
|
platform,
|
||||||
@@ -145,7 +141,7 @@ export function llvmPackages({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mkLibpgmathPackage(): PackageTask {
|
function mkLibpgmathPackage(): PackageTask {
|
||||||
const build = buildDirs.libpgmath;
|
const build = buildDir('libpgmath');
|
||||||
return {
|
return {
|
||||||
name: "libpgmath",
|
name: "libpgmath",
|
||||||
configurePhase: async () => {
|
configurePhase: async () => {
|
||||||
@@ -174,7 +170,7 @@ export function llvmPackages({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mkCflangPackage(): PackageTask {
|
function mkCflangPackage(): PackageTask {
|
||||||
const build = buildDirs.cflang;
|
const build = buildDir('cflang');
|
||||||
return {
|
return {
|
||||||
name: "cflang",
|
name: "cflang",
|
||||||
configurePhase: async () => {
|
configurePhase: async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user