diff options
author | Florian Angeletti <florian.angeletti@inria.fr> | 2020-03-11 09:44:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 09:44:00 +0100 |
commit | 95a5399b2852acf1c4e0094a20bdd74315968fc5 (patch) | |
tree | 6510563eb1c1f528144c5ebe73697bf6d985ca6e /debugger | |
parent | abeaef92fb7694a9e0bdcbeb7d64c66887ed295a (diff) | |
download | ocaml-95a5399b2852acf1c4e0094a20bdd74315968fc5.tar.gz |
ocamldebug: initialize all functions in Env (#9356)
Switch ocamldebug to compiler-libs in order to avoid hidden dependencies issue.
In particular, the Env module is only fully initialized after the Typemod and Includemod modules have been linked. Calling `Env.find_type` before that initialization may result in an assert false when functor-derived types are involved.
Diffstat (limited to 'debugger')
-rw-r--r-- | debugger/Makefile | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/debugger/Makefile b/debugger/Makefile index 5a8c536f71..4b8af0c64d 100644 --- a/debugger/Makefile +++ b/debugger/Makefile @@ -39,34 +39,7 @@ DIRECTORIES=$(UNIXDIR) $(DYNLINKDIR) $(addprefix $(ROOTDIR)/,\ INCLUDES=$(addprefix -I ,$(DIRECTORIES)) -utils_modules := $(addprefix utils/,\ - config build_path_prefix_map misc identifiable numbers arg_helper clflags \ - consistbl warnings terminfo load_path) - -parsing_modules := $(addprefix parsing/,\ - location longident docstrings syntaxerr ast_helper ast_mapper ast_iterator \ - attr_helper builtin_attributes pprintast \ - lexer camlinternalMenhirLib parser parse) - -typing_modules := $(addprefix typing/,\ - ident path type_immediacy types btype primitive typedtree subst predef \ - datarepr persistent_env env oprint ctype printtyp mtype envaux) - -file_formats_modules := $(addprefix file_formats/,\ - cmi_format) - -lambda_modules := $(addprefix lambda/,\ - runtimedef) - -bytecomp_modules := $(addprefix bytecomp/,\ - bytesections dll meta symtable opcodes) - -other_compiler_modules := toplevel/genprintval - -compiler_modules := $(addprefix $(ROOTDIR)/,\ - $(utils_modules) $(parsing_modules) $(file_formats_modules) \ - $(lambda_modules) \ - $(typing_modules) $(bytecomp_modules) $(other_compiler_modules)) +compiler_modules := $(ROOTDIR)/toplevel/genprintval debugger_modules := \ int64ops primitives unix_tools debugger_config parameters debugger_lexer \ @@ -79,9 +52,12 @@ all_modules := $(compiler_modules) $(debugger_modules) all_objects := $(addsuffix .cmo,$(all_modules)) +libraries = $(ROOTDIR)/compilerlibs/ocamlcommon.cma \ + $(UNIXDIR)/unix.cma $(DYNLINKDIR)/dynlink.cma + all: ocamldebug$(EXE) -ocamldebug$(EXE): $(UNIXDIR)/unix.cma $(DYNLINKDIR)/dynlink.cma $(all_objects) +ocamldebug$(EXE): $(libraries) $(all_objects) $(CAMLC) $(LINKFLAGS) -o $@ -linkall $^ install: |