Skip to content

Commit ba512a6

Browse files
committed
v help: describe CFLAGS and LDFLAGS support in v help build-c
1 parent b951d67 commit ba512a6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/v/help/build-c.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ see also `v help build`.
1616
Pass the provided flag as is to the C compiler.
1717
Can be specified multiple times to provide multiple flags.
1818
Use quotes to wrap the flag argument if it contains spaces.
19-
19+
20+
V also supports the environment variables CFLAGS and LDFLAGS.
21+
The contents of the CFLAGS variable will be prepended as is, at the start
22+
of the C backend command, right after the name of the compiler.
23+
The contents of the LDFLAGS variable will be appended as is, at the end
24+
of the C backend command, after all other options.
25+
2026
-cstrict
2127
Turn on additional C warnings. This slows down compilation
2228
slightly (~10-10% for gcc), but sometimes provides better diagnosis.

0 commit comments

Comments
 (0)