mirror of
https://github.com/vlang/v.git
synced 2025-09-13 09:25:45 -04:00
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:
parent
b528395039
commit
4b68dffa49
@ -200,13 +200,6 @@ pub fn verror(kind string, s string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn vlines_escape_path(path string, ccompiler string) 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))
|
return cescaped_path(os.real_path(path))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user