environment: refactor interfaces, splitting

This commit is contained in:
2024-06-22 23:05:03 +08:00
parent c38b75cd9b
commit cbd356ce63

View File

@@ -5,39 +5,44 @@ export const SYSROOT_PREFIX = "/usr/sw/standard-830-6b-test";
export const projectRoot = path.join(__dirname, "..", "..", "..");
export const local = path.resolve(projectRoot, "local");
/**
* User-specific environment on Sw6B machine.
*/
export interface Sw6BEnvironment {
/**
* Home directory
*/
home: string;
/**
* Source to llvm-projdct
*/
llvmSrc?: string;
/**
* Private directory, writable, to put llvm installation.
*/
privateLLVMInstall?: string;
/**
* Shared llvm installation directory, readonly for all users.
*/
sharedLLVMInstall?: string;
export interface HaveSPEC2017 {
/**
* Path to default spec2017 installation.
*/
spec2017: string;
}
export interface HaveLLVMSource {
/**
* Source to llvm-projdct
*/
llvmSrc?: string;
}
export const lycEnv: Sw6BEnvironment = (() => {
export interface HaveLLVMInstall {
/**
* Private directory, writable, to put llvm installation.
*/
privateLLVMInstall: string;
/**
* Shared llvm installation directory, readonly for all users.
*/
sharedLLVMInstall: string;
}
/**
* User-specific environment on Sw6B machine.
*/
export interface HaveHome {
/**
* Home directory
*/
home: string;
}
export const lycEnv = (() => {
const home = path.resolve("/", "home", "lyc");
const swAutoVec = path.resolve(home, "workspace", "sw-autovec");
const llvmSrc = path.resolve(swAutoVec, "swllvm-13.0.0-vect0919");