mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
docs: use -cross
instead of -os cross
This commit is contained in:
parent
bdb8b30e4d
commit
2806a8a9ec
3 changed files with 7 additions and 5 deletions
|
@ -268,7 +268,7 @@ fn (mut c Checker) if_expr(mut node ast.IfExpr) ast.Type {
|
||||||
}
|
}
|
||||||
if c.fn_level == 0 && c.pref.output_cross_c {
|
if c.fn_level == 0 && c.pref.output_cross_c {
|
||||||
// do not skip any of the branches for top level `$if OS {`
|
// do not skip any of the branches for top level `$if OS {`
|
||||||
// statements, in `-os cross` mode
|
// statements, in `-cross` mode
|
||||||
found_branch = false
|
found_branch = false
|
||||||
c.skip_flags = false
|
c.skip_flags = false
|
||||||
c.ct_cond_stack << branch.cond
|
c.ct_cond_stack << branch.cond
|
||||||
|
|
|
@ -46,7 +46,7 @@ pub enum Platform {
|
||||||
vinix
|
vinix
|
||||||
haiku
|
haiku
|
||||||
raw
|
raw
|
||||||
cross // TODO: add functionality for v doc -os cross whenever possible
|
cross // TODO: add functionality for v doc -cross whenever possible
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy of pref.os_from_string
|
// copy of pref.os_from_string
|
||||||
|
|
|
@ -109,10 +109,12 @@ see also `v help build`.
|
||||||
The module declaration should be `builtin`. The default Linux
|
The module declaration should be `builtin`. The default Linux
|
||||||
implementation can be found in `vlib/builtin/linux_bare`.
|
implementation can be found in `vlib/builtin/linux_bare`.
|
||||||
|
|
||||||
|
-cross
|
||||||
|
With `-cross`, V will attempt to output cross-platform C code.
|
||||||
|
|
||||||
-os <os>, -target-os <os>
|
-os <os>, -target-os <os>
|
||||||
Change the target OS that V tries to compile for.
|
Change the target OS that V tries to compile for.
|
||||||
By default, the target OS is the host system.
|
By default, the target OS is the host system.
|
||||||
When OS is `cross`, V will attempt to output cross-platform C code.
|
|
||||||
|
|
||||||
Here is a list of the operating systems, supported by V:
|
Here is a list of the operating systems, supported by V:
|
||||||
(CI tests runs on every commit/PR for each of these):
|
(CI tests runs on every commit/PR for each of these):
|
||||||
|
@ -142,7 +144,7 @@ see also `v help build`.
|
||||||
If you compile with `-os freebsd`, then x_default.c.v will be used.
|
If you compile with `-os freebsd`, then x_default.c.v will be used.
|
||||||
If you compile with `-os linux`, then x_linux.c.v will be used.
|
If you compile with `-os linux`, then x_linux.c.v will be used.
|
||||||
If you compile with `-os windows`, then x_windows.c.v will be used.
|
If you compile with `-os windows`, then x_windows.c.v will be used.
|
||||||
If you compile with `-os cross`, then all, *except x_default.c.v*
|
If you compile with `-cross`, then all, *except x_default.c.v*
|
||||||
will be used, wrapped in conditional compilation guards, so that
|
will be used, wrapped in conditional compilation guards, so that
|
||||||
the generated C source code will be larger, but will compile on all
|
the generated C source code will be larger, but will compile on all
|
||||||
explicitly supported platforms without source changes.
|
explicitly supported platforms without source changes.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue