Still include builtins when compiling with --noLib, fixes #190

This commit is contained in:
dcodeIO 2018-09-09 04:05:00 +02:00
parent d0085ad3d6
commit 658ab23ea6
3 changed files with 13 additions and 3 deletions

View File

@ -230,7 +230,7 @@ exports.main = function main(argv, options, callback) {
var parser = null;
// Include library files
if (!args.noLib) { // bundled
if (!args.noLib) {
Object.keys(exports.libraryFiles).forEach(libPath => {
if (libPath.indexOf("/") >= 0) return; // in sub-directory: imported on demand
stats.parseCount++;
@ -243,6 +243,16 @@ exports.main = function main(argv, options, callback) {
);
});
});
} else { // always include builtins
stats.parseCount++;
stats.parseTime += measure(() => {
parser = assemblyscript.parseFile(
exports.libraryFiles["builtins"],
exports.libraryPrefix + "builtins.ts",
false,
parser
);
});
}
const customLibDirs = [];
if (args.lib) {

2
dist/asc.js vendored

File diff suppressed because one or more lines are too long

2
dist/asc.js.map vendored

File diff suppressed because one or more lines are too long