native: fix again v -os macos -experimental -b native -o hw.macos examples/hello_world.v, after the latest changes to the backend

This commit is contained in:
Delyan Angelov 2025-06-12 13:26:02 +03:00
parent 36bef926fb
commit 9e2462a876
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED
4 changed files with 32 additions and 1 deletions

View file

@ -14,6 +14,22 @@ pub fn exec(command string) {
}
}
pub fn file_size_greater_than(fpath string, min_fsize u64) {
log.info('path should exist `${fpath}` ...')
if !os.exists(fpath) {
exit(1)
}
log.info('path exists, and should be a file: `${fpath}` ...')
if !os.is_file(fpath) {
exit(2)
}
real_size := os.file_size(fpath)
log.info('actual file size of `${fpath}` is ${real_size}, wanted: ${min_fsize}, diff: ${real_size - min_fsize}.')
if real_size < min_fsize {
exit(3)
}
}
const self_command = 'v ' +
os.real_path(os.executable()).replace_once(os.real_path(@VROOT), '').trim_left('/\\') + '.vsh'