commands: create a dedicated commands directory
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import child_process from "child_process"
|
||||
import { PlatformPath } from "path"
|
||||
import path from "path"
|
||||
|
||||
// FIXME: these imports basically looks ugly.
|
||||
import { LLVM_EXTRACT, PREFIX, SYSROOT_PREFIX, FLANG } from "./environment";
|
||||
import { CompilerCommands } from "./commands";
|
||||
import { ExtractOptions, extractCommand } from "./commands/compiler";
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,10 +35,10 @@ export function functionList(module: string) {
|
||||
/**
|
||||
* Extract one function using llvm-extract
|
||||
*/
|
||||
export async function extract(options: CompilerCommands.ExtractOptions) {
|
||||
export async function extract(options: ExtractOptions) {
|
||||
let process = child_process.spawn(
|
||||
LLVM_EXTRACT,
|
||||
CompilerCommands.extractCommand(options),
|
||||
extractCommand(options),
|
||||
{ stdio: "inherit" }
|
||||
)
|
||||
const exitcode = await new Promise((resolve, reject) => { process.on('close', resolve) })
|
||||
|
||||
Reference in New Issue
Block a user