fixes compiler ignoring passC/passL args when setting --cc:compiler. (#5310)

This commit change the way passC/passL cmdline arg and setting in config
files are parsed.
They are added to a separate linkOptionsCmd/compileOptionsCmd and are
inserted when compile/linking command list are requested.
This commit is contained in:
Parashurama 2017-02-01 08:51:24 +01:00 • committed by Andreas Rumpf
commit 2aec5b6c49
2 changed files with 15 additions and 3 deletions

View file

@ -509,10 +509,10 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
else: localError(info, errGuiConsoleOrLibExpectedButXFound, arg)
of "passc", "t":
expectArg(switch, arg, pass, info)
if pass in {passCmd2, passPP}: extccomp.addCompileOption(arg)
if pass in {passCmd2, passPP}: extccomp.addCompileOptionCmd(arg)
of "passl", "l":
expectArg(switch, arg, pass, info)
if pass in {passCmd2, passPP}: extccomp.addLinkOption(arg)
if pass in {passCmd2, passPP}: extccomp.addLinkOptionCmd(arg)
of "cincludes":
expectArg(switch, arg, pass, info)
if pass in {passCmd2, passPP}: cIncludes.add arg.processPath(info)