From 80fc749835509d4bdd23d957ce8b2ddf028596dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Tue, 6 Jun 2023 20:32:16 +0100 Subject: [PATCH] fixes #22025 vcc fails with The filename or extension is too long. when linking (#22026) [vcc]makes paths relative when possible fixes #22025 --- tools/vccexe/vccexe.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/vccexe/vccexe.nim b/tools/vccexe/vccexe.nim index d548666b91..2a43f7422b 100644 --- a/tools/vccexe/vccexe.nim +++ b/tools/vccexe/vccexe.nim @@ -211,6 +211,11 @@ when isMainModule: if verboseArg: vccOptions.incl poEchoCmd + let currentDir = getCurrentDir() + for arg in clArgs.mitems: + if fileExists(arg): + arg = relativePath(arg, currentDir) + # Default to the cl.exe command if no secondary command was specified if commandArg.len < 1: commandArg = "cl.exe"