Skip to content

Commit

Permalink
Make-it: fixed emscripten build
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Austin committed Aug 11, 2015
1 parent 0be4c2d commit 90b9527
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
13 changes: 8 additions & 5 deletions make-it/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ function compile(opts, fileName) {
}
//------------------------------------------------------------
function link(opts) {
console.log('Linking...');
console.log(opts.linkCommand);
sh.exec(opts.linkCommand + opts.filesToLink);
if (opts.linkCommand) {
console.log('Linking...');
console.log(opts.linkCommand);
sh.exec(opts.linkCommand + opts.filesToLink);
}
if (opts.stripCommand) {
sh.exec(opts.stripCommand);
}
Expand Down Expand Up @@ -167,7 +169,7 @@ function configureSettings(opts, targetPlatform) {
// SITEDIR=../Documents/gh-pages/playground

opts.ccCommand = compileEmscriptenCommand;
opts.linkCommand = 'emcc';
opts.linkCommand = 'emcc ';
opts.linkCommand += '-dead_strip ';
opts.linkCommand += '-Os ';
opts.linkCommand += '-fno-exceptions ';
Expand All @@ -177,7 +179,7 @@ function configureSettings(opts, targetPlatform) {
opts.linkCommand += '--pre-js ' + opts.sourceRoot + 'core/vireo.preamble.js ';
opts.linkCommand += '--post-js ' + opts.sourceRoot + 'core/vireo.postamble.js ';
opts.linkCommand += '-s NO_EXIT_RUNTIME=1 ';
opts.linkCommand += '-o vireo.js ';
opts.linkCommand += '-o ../target-support/js/vireo.js ';

var EM_EXPORTS = '-s EXPORTED_FUNCTIONS="[' +
'\'_Vireo_Version\',' +
Expand All @@ -195,6 +197,7 @@ function configureSettings(opts, targetPlatform) {
'\'_Data_WriteUInt32\'' +
']" -s RESERVED_FUNCTION_POINTERS=10 ';
opts.linkCommand += EM_EXPORTS;
opts.strip = null;

} else if (targetPlatform === 'win32' || targetPlatform === 'win64') {
sh.mkdir('-p', buildOptions.objRoot + 'win/');
Expand Down
20 changes: 0 additions & 20 deletions target-support/js/vireo.js

This file was deleted.

0 comments on commit 90b9527

Please sign in to comment.