help: update help .txt files
parent
e0ab318f56
commit
1863dda8e5
|
@ -11,27 +11,32 @@ These build flags are enabled on `build` and `run` as long as the backend is set
|
|||
Change the architecture that V will tell the C compiler to build.
|
||||
List of supported architectures: `x86` and `x64` (default).
|
||||
|
||||
-cc <compiler>, -compiler <compiler>
|
||||
-cc <compiler>
|
||||
Change the C compiler V invokes to the specified compiler.
|
||||
The C compiler is required to support C99.
|
||||
Officially supported/tested C compilers include: `clang`, `gcc`, `tcc`, `mingw-w64` and `msvc`.
|
||||
|
||||
-cf <flag>, -cflags <flag>
|
||||
-cflags <flag>
|
||||
Pass the provided flag as is to the C compiler.
|
||||
Can be specified multiple times to provide multiple flags.
|
||||
Use quotes to wrap the flag argument if it contains spaces.
|
||||
|
||||
-cg, -cdebug
|
||||
Enable debug mode while preserving C line numbers in the compiled executable.
|
||||
This allows issues regarding C compilation to be located more easily.
|
||||
-printfn <fn_name>
|
||||
Prints the content of the generated C function named fn_name. You can repeat that many times.
|
||||
This is useful when you just want to quickly tweak the generated C code,
|
||||
without opening the generated .c file in an text editor.
|
||||
|
||||
-cg
|
||||
Enable generating more debug information in the compiled executable.
|
||||
This makes program backtraces more useful.
|
||||
Using debuggers like gdb/lldb with such executables is easier too.
|
||||
|
||||
-compress
|
||||
Strip the compiled executable to compress it.
|
||||
|
||||
-csource <keep|drop>
|
||||
Specify how V deals with the intermediate C source code.
|
||||
* `keep` - The C source code will be kept as generated by V.
|
||||
* `drop` (default) - The C source code will be deleted after compiling the executable.
|
||||
-keepc
|
||||
Specify that you want V to not delete the intermediate generated C source code.
|
||||
Use with -cg for best debugging experience.
|
||||
|
||||
-freestanding
|
||||
Build the executable without dependency on libc.
|
||||
|
|
|
@ -41,11 +41,7 @@ The build flags are shared by the build and run commands:
|
|||
Enable the specified experiment.
|
||||
Currently, the only experiment available is: `prealloc`
|
||||
|
||||
-full-rebuild
|
||||
Force a full rebuild of all dependencies.
|
||||
Enabled by default currently until caching works reliably.
|
||||
|
||||
-g
|
||||
-cg
|
||||
Compile the executable in debug mode, allowing code to be debugged more easily.
|
||||
|
||||
-o <output>, -output <output>
|
||||
|
|
|
@ -6,29 +6,34 @@ Usage:
|
|||
Examples:
|
||||
v hello.v Compile the file `hello.v` and output it as `hello` or `hello.exe`.
|
||||
v run hello.v Same as above but also run the produced executable immediately after compilation.
|
||||
v -keepc -cg run hello.v Same as above, but make debugging easier (in case your program crashes).
|
||||
v -o h.c hello.v Translate `hello.v` to `h.c`. Do not compile further.
|
||||
|
||||
The commands are:
|
||||
build Build V code in the provided path (default).
|
||||
V supports the following commands:
|
||||
* New project scaffolding:
|
||||
new Setup the file structure for a V project (in a sub folder).
|
||||
init Setup the file structure for an already existing V project.
|
||||
doc Generate the documentation for a V module.
|
||||
fmt Format the V code provided.
|
||||
repl Run the REPL.
|
||||
* Ordinary development:
|
||||
run Compile and run a V program.
|
||||
symlink Create a symbolic link for V.
|
||||
test Run all test files in the provided directory.
|
||||
translate Translate C code to V (coming soon in 0.3).
|
||||
fmt Format the V code provided.
|
||||
doc Generate the documentation for a V module.
|
||||
repl Run the REPL.
|
||||
* Installation/self updating:
|
||||
symlink Create a symbolic link for V.
|
||||
up Run the V self-updater.
|
||||
self [-prod] Run the V self-compiler, use -prod to optimize compilation.
|
||||
version Print the version text and exits.
|
||||
|
||||
* Module/package management:
|
||||
install Install a module from VPM.
|
||||
remove Remove a module that was installed from VPM.
|
||||
search Search for a module from VPM.
|
||||
update Update an installed module from VPM.
|
||||
* Others:
|
||||
build Build a V code in the provided path (the default, so you can skip the word `build`).
|
||||
translate Translate C code to V (coming soon in 0.3).
|
||||
|
||||
Use "v help <command>" for more information about a command, example: `v help build`
|
||||
Use "v help <command>" for more information about a command, example: `v help build`, `v help build-c`
|
||||
Use "v help other" to see less frequently used commands.
|
||||
|
||||
Note: Help is required to write more help topics.
|
||||
|
|
Loading…
Reference in New Issue