aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.extr
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-11-14 10:09:34 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2020-11-14 10:18:00 +0100
commit27beb944ff6ff18ea612c116e414eb40ce1320a6 (patch)
tree0f8404d343ac7c95ed3351053984f8fda6f8e703 /Makefile.extr
parente87f24575e79e7866b132f0a970cf6f82d115b88 (diff)
downloadcompcert-kvx-27beb944ff6ff18ea612c116e414eb40ce1320a6.tar.gz
compcert-kvx-27beb944ff6ff18ea612c116e414eb40ce1320a6.zip
Do not use -warn-error when building from a release tarball
Stopping on warnings is useful for development builds, but unhelpful for released software.
Diffstat (limited to 'Makefile.extr')
-rw-r--r--Makefile.extr11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.extr b/Makefile.extr
index b417945b..23e01614 100644
--- a/Makefile.extr
+++ b/Makefile.extr
@@ -50,13 +50,20 @@ INCLUDES=$(patsubst %,-I %, $(DIRS))
# Control of warnings:
-WARNINGS=-w +a-4-9-27 -strict-sequence -safe-string -warn-error +a #Deprication returns with ocaml 4.03
+WARNINGS=-w +a-4-9-27
extraction/%.cmx: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67
extraction/%.cmo: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67
cparser/pre_parser.cmx: WARNINGS += -w -41
cparser/pre_parser.cmo: WARNINGS += -w -41
-COMPFLAGS+=-g $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS)
+# Turn warnings into errors, but not for released tarballs
+ifeq ($(wildcard .git),.git)
+WARN_ERRORS=-warn-error +a
+else
+WARN_ERRORS=
+endif
+
+COMPFLAGS+=-g -strict-sequence -safe-string $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS) $(WARN_ERRORS)
# Using .opt compilers if available