Skip to content
Snippets Groups Projects
Commit 1a6056c3 authored by Patrick Baudin's avatar Patrick Baudin
Browse files

[Configure] Removes Fc_config.ocaml_wflags

parent e88d46bd
No related branches found
No related tags found
No related merge requests found
...@@ -101,7 +101,6 @@ config.sed: VERSION share/Makefile.config share/Makefile.common Makefile configu ...@@ -101,7 +101,6 @@ config.sed: VERSION share/Makefile.config share/Makefile.common Makefile configu
@echo "s|@VERSION_CODENAME@|$(VERSION_CODENAME)|" >> $@ @echo "s|@VERSION_CODENAME@|$(VERSION_CODENAME)|" >> $@
@echo "s|@MAJOR_VERSION@|$(MAJOR_VERSION)|g" >> $@ @echo "s|@MAJOR_VERSION@|$(MAJOR_VERSION)|g" >> $@
@echo "s|@MINOR_VERSION@|$(MINOR_VERSION)|g" >> $@ @echo "s|@MINOR_VERSION@|$(MINOR_VERSION)|g" >> $@
@echo "s|@WARNINGS@|$(WARNINGS)|" >> $@
@echo "s|@FRAMAC_DEFAULT_CPP@|$(FRAMAC_DEFAULT_CPP)|" >> $@ @echo "s|@FRAMAC_DEFAULT_CPP@|$(FRAMAC_DEFAULT_CPP)|" >> $@
@echo "s|@FRAMAC_DEFAULT_CPP_ARGS@|$(FRAMAC_DEFAULT_CPP_ARGS)|" >> $@ @echo "s|@FRAMAC_DEFAULT_CPP_ARGS@|$(FRAMAC_DEFAULT_CPP_ARGS)|" >> $@
@echo "s|@FRAMAC_GNU_CPP@|$(FRAMAC_GNU_CPP)|" >> $@ @echo "s|@FRAMAC_GNU_CPP@|$(FRAMAC_GNU_CPP)|" >> $@
......
...@@ -32,60 +32,6 @@ include $(MAKECONFIG_DIR)/Makefile.config ...@@ -32,60 +32,6 @@ include $(MAKECONFIG_DIR)/Makefile.config
# Flags # # Flags #
################## ##################
# Flags to be used by ocamlc and ocamlopt when compiling Frama-C
# itself. For development versions, we add -warn-error for most
# warnings -warn-error has effect only for warnings that are
# explicitly set using '-w'.
ifeq ($(DEVELOPMENT),yes)
# Most warnings are activated by default. Those settings are inherited
# in the compilation of external plugins.
# - 4 (fragile pattern-matching) only make sense when adding a node to a type.
# OCaml GPR #1071 will make it usable
# - 6 (omit label in application) would make code clearer, but requires
# refactoring before being enabled.
# - 9 (missing field in record pattern) is much too heavy. Most of the time
# not all fields are relevant in pattern-matching Frama-C's AST.
# - 40 (constructor or label name used out of scope)
# - 41 (ambiguous constructor or label name)
# - 42 (Disambiguated constructor or label name)
# these three warnings prevents type-based disambiguation,
# a feature which is seen as a good thing by many developers
# - 44 (open shadows an identifier)
# - 45 (open shadows a label or constructor): While the use of open directives
# is supposed to stay small, it should still be possible to open modules
# that share common names, barring some mechanism to open only parts of a
# module.
# - 48 (implicit elimination of optional arguments): makes use of functions
# with optional arguments heavier in higher-order context
# - 67 (unused module parameter in functor signature): naming all parameters
# in functor signatures is a common practice that seems harmless. Warning 60
# ensures that named functor parameters are indeed used in the implementation.
WARNINGS ?= +a-4-9-40-41-42-44-45-48-67
# - 3 (deprecated feature) cannot always be avoided for OCaml stdlib when
# supporting several OCaml versions
# - 4 (fragile pattern matching) will be activated when adding a node (see
# above), in order to let the developer decide whether a case should be
# added on relevant fragile pattern or not: a matching might very well stay
# fragile without triggering an error.
# - 3x (various categories of unused identifiers) it is sometimes useful to
# let code compile despite such warnings when in the middle of a development.
# On the other hand, a completed feature should not trigger such warnings.
# - 58 (missing cmx) is triggered by some versions of external libraries.
# Situation should probably improve as these libraries get updated, leading
# to treat this warning as error.
WARN_ERROR ?= -warn-error +a-3-4-32-33-34-35-36-37-38-39-58
else
WARNINGS ?= -a
endif #DEVELOPMENT
FLAGS = $(WARNINGS) $(WARN_ERROR) $(OCAML_ANNOT_OPTION) -strict-sequence \
-safe-string
DEBUG = -g
############# #############
# Verbosing # # Verbosing #
############# #############
......
...@@ -53,8 +53,8 @@ let dump_to_json () = ...@@ -53,8 +53,8 @@ let dump_to_json () =
"is_gui", `Bool Fc_config.is_gui ; "is_gui", `Bool Fc_config.is_gui ;
(* "lablgtk", `String Fc_config.lablgtk ; (* "lablgtk", `String Fc_config.lablgtk ;
* "ocamlc", `String Fc_config.ocamlc ; * "ocamlc", `String Fc_config.ocamlc ;
* "ocamlopt", `String Fc_config.ocamlopt ; *) * "ocamlopt", `String Fc_config.ocamlopt ;
"ocaml_wflags", `String Fc_config.ocaml_wflags ; * "ocaml_wflags", `String Fc_config.ocaml_wflags ; *)
"datadir", `String (Fc_config.datadir:>string) ; "datadir", `String (Fc_config.datadir:>string) ;
"datadirs", "datadirs",
list string (Filepath.Normalized.to_string_list Fc_config.datadirs) ; list string (Filepath.Normalized.to_string_list Fc_config.datadirs) ;
......
...@@ -32,7 +32,6 @@ let minor_version = @MINOR_VERSION@ ...@@ -32,7 +32,6 @@ let minor_version = @MINOR_VERSION@
let is_gui = Frama_c_very_first.Gui_init.is_gui let is_gui = Frama_c_very_first.Gui_init.is_gui
let ocaml_wflags = "@WARNINGS@"
let datadirs = (List.map Filepath.Normalized.of_string Config_data.Sites.share) let datadirs = (List.map Filepath.Normalized.of_string Config_data.Sites.share)
let datadir = List.hd (List.rev datadirs) let datadir = List.hd (List.rev datadirs)
......
...@@ -48,10 +48,6 @@ val is_gui: bool ...@@ -48,10 +48,6 @@ val is_gui: bool
@since frama-c-trunk not anymore a reference @since frama-c-trunk not anymore a reference
*) *)
val ocaml_wflags: string
(** Warning flags used when compiling Frama-C.
@since Chlorine-20180501 *)
val datadirs: Filepath.Normalized.t list val datadirs: Filepath.Normalized.t list
(** Directories where architecture independent files are in order of (** Directories where architecture independent files are in order of
priority. priority.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment