From ba512a6a8e7dd22292b40b4a64c625552314d325 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 22 Apr 2021 18:12:28 +0300 Subject: [PATCH] v help: describe CFLAGS and LDFLAGS support in `v help build-c` --- cmd/v/help/build-c.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/v/help/build-c.txt b/cmd/v/help/build-c.txt index 01b1360ab0..dc75a60d06 100644 --- a/cmd/v/help/build-c.txt +++ b/cmd/v/help/build-c.txt @@ -16,7 +16,13 @@ see also `v help build`. 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. - + + V also supports the environment variables CFLAGS and LDFLAGS. + The contents of the CFLAGS variable will be prepended as is, at the start + of the C backend command, right after the name of the compiler. + The contents of the LDFLAGS variable will be appended as is, at the end + of the C backend command, after all other options. + -cstrict Turn on additional C warnings. This slows down compilation slightly (~10-10% for gcc), but sometimes provides better diagnosis.