1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: brin back hashes()

This commit is contained in:
Alexander Medvednikov 2020-04-02 13:49:59 +02:00
parent 5b835d294c
commit 6e380b8897

View File

@ -8,6 +8,7 @@ import (
v.token v.token
v.pref v.pref
term term
v.util
) )
const ( const (
@ -98,6 +99,13 @@ pub fn cgen(files []ast.File, table &table.Table, pref &pref.Preferences) string
if g.is_test { if g.is_test {
g.write_tests_main() g.write_tests_main()
} }
return g.hashes() + g.typedefs.str() + g.definitions.str() + g.out.str()
}
pub fn (g &Gen) hashes() string {
mut res := c_commit_hash_default.replace('@@@', util.vhash() )
res += c_current_commit_hash_default.replace('@@@', util.githash( g.pref.building_v ) )
return res
return c_commit_hash_default + g.typedefs.str() + g.definitions.str() + g.out.str() return c_commit_hash_default + g.typedefs.str() + g.definitions.str() + g.out.str()
} }