Clean up crc module
Use better names, remove quite a bit of dead code. Change `><` to a name that's actually descriptive.
This commit is contained in:
parent
5ad9d874c3
commit
188bba2b3c
5 changed files with 30 additions and 76 deletions
|
|
@ -572,13 +572,13 @@ proc getCompileCFileCmd*(cfilename: string, isExternal = false): string =
|
|||
"nim", quoteShell(getPrefixDir()),
|
||||
"lib", quoteShell(libpath)])
|
||||
|
||||
proc footprint(filename: string): TCrc32 =
|
||||
# note, '><' further modifies a crc value with a string.
|
||||
result = crcFromFile(filename) ><
|
||||
platform.OS[targetOS].name ><
|
||||
platform.CPU[targetCPU].name ><
|
||||
extccomp.CC[extccomp.cCompiler].name ><
|
||||
getCompileCFileCmd(filename, true)
|
||||
proc footprint(filename: string): SecureHash =
|
||||
result = secureHash(
|
||||
$secureHashFile(filename) &
|
||||
platform.OS[targetOS].name &
|
||||
platform.CPU[targetCPU].name &
|
||||
extccomp.CC[extccomp.cCompiler].name &
|
||||
getCompileCFileCmd(filename, true))
|
||||
|
||||
proc externalFileChanged(filename: string): bool =
|
||||
if gCmd notin {cmdCompileToC, cmdCompileToCpp, cmdCompileToOC, cmdCompileToLLVM}:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue