summary refs log tree commit diff stats
path: root/compiler/extccomp.nim
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-05-23 12:59:15 -0400
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-05-23 13:01:52 -0400
commit188bba2b3cd3106e0c615e712b8f5fdd995137bb (patch)
tree8343b9cf10d802edc48f25f8b263fcf92e6737b6 /compiler/extccomp.nim
parent5ad9d874c32a72ab473d3455b5d72f915729d195 (diff)
downloadNim-188bba2b3cd3106e0c615e712b8f5fdd995137bb.tar.gz
Clean up crc module
Use better names, remove quite a bit of dead code.
Change `><` to a name that's actually descriptive.
Diffstat (limited to 'compiler/extccomp.nim')
-rw-r--r--compiler/extccomp.nim14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index 186a3884d..cd7ac2a68 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -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}: