Skip to content

Commit

Permalink
Adapt for changes in how the 'cc' crate invokes 'lib.exe' and 'cl.exe'
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Aug 22, 2019
1 parent e276e6e commit 540a91e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions gen.js
Expand Up @@ -1172,19 +1172,19 @@ function parseLibArgs([...args], cwd) {
let argsOut = [];
let arg;
while ((arg = args.shift())) {
let m = /^(\/[^:]+)(?::(.*))?$/.exec(arg);
let m = /^[\/\-]([^:]+)(?::(.*))?$/.exec(arg);
if (m) {
let [, libflag, value] = m;
let output, path;
switch (libflag) {
case "/OUT":
switch (libflag.toUpperCase()) {
case "OUT":
output = "static_lib";
// Fall through.
case "/DEF":
case "/LIST":
case "/LIBPATH":
case "/NAME":
case "/OUT":
case "DEF":
case "LIST":
case "LIBPATH":
case "NAME":
case "OUT":
path = resolve(cwd, value);
}
argsOut.push({ libflag, value, output, path });
Expand Down
4 changes: 2 additions & 2 deletions trace.js
Expand Up @@ -294,8 +294,8 @@ async function traceTargetBuild(target) {
const { program, cwd, args } = command;
for (const arg of args) {
let m =
(program === "lib" && /^\/OUT:(.*)$/.exec(arg)) ||
(program === "cl" && /^\/Fo(.*)$/.exec(arg)) ||
(program === "lib" && /^[\/\-]OUT:(.*)$/i.exec(arg)) ||
(program === "cl" && /^[\/\-]Fo(.*)$/.exec(arg)) ||
(program === "cc" && /^\-o(.*)$/.exec(arg));
program === "ar" && /^(.*\.a)$/.exec(arg);
if (m) {
Expand Down

0 comments on commit 540a91e

Please sign in to comment.