Skip to content

Commit a82298d

Browse files
committed
squash! only require necessary module for the current OS
Also, Fedora + lldb 5.0 has been tested.
1 parent 5d3cc84 commit a82298d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/configure.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ const fs = require('fs');
55
const path = require('path');
66
const child_process = require('child_process');
77

8-
const linux = require('./linux');
9-
const darwin = require('./darwin');
10-
const freebsd = require('./freebsd');
118
const lldb = require('./lldb');
129

1310
function main() {
@@ -40,6 +37,7 @@ function configureInstallation(osName, buildDir) {
4037
let prefix; // Similar to what `llvm-config --prefix` returns
4138

4239
if (osName === 'Darwin') {
40+
const darwin = require('./darwin');
4341
installation = darwin.getLldbInstallation();
4442
prefix = installation.prefix;
4543
if (prefix === undefined) { // Using Xcode installation
@@ -52,6 +50,7 @@ function configureInstallation(osName, buildDir) {
5250
writeConfig(config);
5351
}
5452
} else if (osName === 'Linux') {
53+
const linux = require('./linux');
5554
installation = linux.getLldbInstallation();
5655
if (installation.prefix === undefined)
5756
// Could not find the headers, need to download them
@@ -62,6 +61,7 @@ function configureInstallation(osName, buildDir) {
6261
// ./lldb will always be linked to the prefix on Linux
6362
writeConfig({});
6463
} else if (osName === 'FreeBSD') {
64+
const freebsd = require('./freebsd');
6565
installation = freebsd.getLldbInstallation();
6666
prefix = installation.prefix;
6767
// ./lldb will always be linked to the prefix

0 commit comments

Comments
 (0)