3 ms·
According to the website, V seems to have two backends: C and x86 - so it's not just a frontend to GCC. Unless I'm mistaken?
by akrymski 6y ago
According to the website, V seems to have two backends: C and x86 - so it's not just a frontend to GCC. Unless I'm mistaken?
- delian66 6y agoThere is a native backend, that compiles directly to elf binaries on linux without using a C compiler, but it is still wip (and can not yet be used to selfcompile V itself for example). For example: 0[20:45:04] /v/nv LINUX $ ./v -x64 examples/hello_world.v use `v -x64 -v ...` to print resulting asembly/machine code code_start_pos = 78 x64 elf binary has been successfully generated 0[20:45:08] /v/nv LINUX $ ls -lart examples/hello_world -rwxrwxr-x 1 delian delian 188 сеп 15 20:45 examples/hello_world 0[20:45:17] /v/nv LINUX $ examples/hello_world Hello, World! 0[20:45:21] /v/nv LINUX $ ... and yes - the generated executable is 188 bytes long...