vfmt: fix `#include "@VROOT/path/x.h"`

pull/5917/head
Delyan Angelov 2020-07-21 14:26:49 +03:00
parent 8f23accc4e
commit 35df792c05
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#flag -I @VROOT/c
#flag @VROOT/c/implementation.o
#include "@VROOT/c/implementation.h"

View File

@ -26,6 +26,9 @@ fn (mut p Parser) resolve_vroot(flag string) string {
' or in one of its parent folders.')
}
vmod_path := vmod_file_location.vmod_folder
if p.pref.is_fmt {
return flag
}
return flag.replace('@VROOT', os.real_path(vmod_path))
}