v.util: shorten the V paths used in the C #line directives with tcc (the ../../../.. etc is no longer needed with newer tcc) (#23974)

This commit is contained in:
Delyan Angelov 2025-03-19 14:50:16 +02:00 committed by GitHub
parent b528395039
commit 4b68dffa49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,13 +200,6 @@ pub fn verror(kind string, s string) {
}
pub fn vlines_escape_path(path string, ccompiler string) string {
is_cc_tcc := ccompiler.contains('tcc')
if is_cc_tcc {
// tcc currently has a bug, causing all #line files,
// to be prefixed with the *same folder as the .tmp.c file*
// this ../../ escaping, is a temporary workaround for that
return '../../../../../..' + cescaped_path(os.real_path(path))
}
return cescaped_path(os.real_path(path))
}