From cbd356ce635a3a0a64eb473522b6ac1b38703bb0 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Sat, 22 Jun 2024 23:05:03 +0800 Subject: [PATCH] environment: refactor interfaces, splitting --- src/environment/index.ts | 57 ++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/src/environment/index.ts b/src/environment/index.ts index b419065..df18d21 100644 --- a/src/environment/index.ts +++ b/src/environment/index.ts @@ -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");