diff options
-rw-r--r-- | compiler/extccomp.nim | 6 | ||||
-rw-r--r-- | compiler/msgs.nim | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 541927f55..683de67e0 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -368,7 +368,9 @@ var cIncludes*: seq[string] = @[] # directories to search for included files cLibs*: seq[string] = @[] # directories to search for lib files cLinkedLibs*: seq[string] = @[] # libraries to link - cValidAssemblers* = @[asmFasm] + +const + cValidAssemblers* = {asmFasm} # implementation @@ -567,6 +569,8 @@ proc getCompileCFileCmd*(cfilename: string, isExternal = false): string = if c == ccNone: rawMessage(errExternalAssemblerNotFound, "") + elif c notin cValidAssemblers: + rawMessage(errExternalAssemblerNotValid, customAssembler) var options = cFileSpecificOptions(cfilename) var exe = getConfigVar(c, ".exe") diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 3dea30964..e739bb4b9 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -109,6 +109,7 @@ type errGenericLambdaNotAllowed, errCompilerDoesntSupportTarget, errExternalAssemblerNotFound, + errExternalAssemblerNotValid, errUser, warnCannotOpenFile, warnOctalEscape, warnXIsNeverRead, warnXmightNotBeenInit, @@ -372,6 +373,7 @@ const "of the generic paramers can be inferred from the expected signature.", errCompilerDoesntSupportTarget: "The current compiler \'$1\' doesn't support the requested compilation target", errExternalAssemblerNotFound: "External assembler not found", + errExternalAssemblerNotValid: "External assembler '$1' is not a valid assembler", errUser: "$1", warnCannotOpenFile: "cannot open \'$1\'", warnOctalEscape: "octal escape sequences do not exist; leading zero is ignored", |