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

ci,cgen: fix -usecache compilation of V itself

This commit is contained in:
Delyan Angelov 2022-07-21 22:29:44 +03:00
parent 73b02cdf36
commit 71cd256f0c
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -411,14 +411,14 @@ pub fn gen(files []&ast.File, table &ast.Table, pref &pref.Preferences) string {
// to make sure type idx's are the same in cached mods
if g.pref.build_mode == .build_module {
for idx, sym in g.table.type_symbols {
if idx == 0 {
if idx in [0, 30] {
continue
}
g.definitions.writeln('int _v_type_idx_${sym.cname}();')
}
} else if g.pref.use_cache {
for idx, sym in g.table.type_symbols {
if idx == 0 {
if idx in [0, 30] {
continue
}
g.definitions.writeln('int _v_type_idx_${sym.cname}() { return $idx; };')