56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
/**
|
|
* -close-rca-pass=true with 3fff408f20f8497b6ff511f7f37b0da96b19a16c compiler.
|
|
*/
|
|
|
|
import path from 'path';
|
|
import { chromiumGN } from '../../bin/lib.js';
|
|
import { chromiumSource } from '../../chromium.js';
|
|
import * as chromiumConfigure from "../configure.js";
|
|
import { mkdir } from 'fs/promises';
|
|
import { promisifySpawn } from '../../cli.js';
|
|
import { spawn } from 'child_process';
|
|
import { systemdRunOptions } from '../../commands/systemd.js';
|
|
import { randomUUID } from 'crypto';
|
|
|
|
|
|
const hash = '3fff408f20f8497b6ff511f7f37b0da96b19a16c';
|
|
|
|
const llvmPrefix = `/tmp/llvm-ly-install/${hash}`;
|
|
|
|
const outDir = path.resolve(chromiumSource, "out", "simd", "symbolic", hash);
|
|
|
|
await mkdir(outDir, { recursive: true });
|
|
|
|
const configureProcess = await chromiumConfigure.configure({
|
|
source: chromiumSource,
|
|
gnExe: chromiumGN,
|
|
outDir,
|
|
gnArgs: {
|
|
clangBasePath: llvmPrefix,
|
|
symbolLevel: 2,
|
|
},
|
|
buildProfile: "norca"
|
|
});
|
|
|
|
|
|
configureProcess.stdout.pipe(process.stdout);
|
|
configureProcess.stderr.pipe(process.stderr);
|
|
|
|
await promisifySpawn(configureProcess);
|
|
|
|
const uuid = randomUUID();
|
|
|
|
// Invoke ninja build
|
|
const systemdUnitName = uuid;
|
|
|
|
console.log(`Running chromium build (hash: ${hash}) as ${systemdUnitName}`);
|
|
|
|
await promisifySpawn(spawn('systemd-run',
|
|
[
|
|
...systemdRunOptions({ user: true, unit: systemdUnitName }),
|
|
'ninja',
|
|
'-C',
|
|
outDir,
|
|
'chrome'
|
|
]
|
|
)); |