[make] fix toplevel

Summary: I needed it for debugging but, to my dismay, it was borked again. This time it was because `jbuilder` moved the object files to another directory since the last jbuilder update.

Reviewed By: mbouaziz

Differential Revision: D7926267

fbshipit-source-id: 42ad26a
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent d7024298f9
commit 9a9d199021

@ -18,9 +18,7 @@ BUILD_MODE ?= opt
MAKE_SOURCE = $(MAKE) -C $(SRC_DIR) INFER_BUILD_DIR=_build/$(BUILD_MODE) MAKE_SOURCE = $(MAKE) -C $(SRC_DIR) INFER_BUILD_DIR=_build/$(BUILD_MODE)
ifneq ($(UTOP),no) ifneq ($(UTOP),no)
# TODO: turn this back on BUILD_SYSTEMS_TESTS += infertop
#BUILD_SYSTEMS_TESTS += infertop
#build_infertop_print build_infertop_test: test_build
endif endif
ifeq ($(BUILD_C_ANALYZERS),yes) ifeq ($(BUILD_C_ANALYZERS),yes)

@ -83,14 +83,12 @@ let stanzas =
(executable (executable
((name infertop) ((name infertop)
(flags (%s)) (flags (%s))
(ocamlopt_flags (%s))
(libraries (utop InferModules)) (libraries (utop InferModules))
(modules (Infertop)) (modules (Infertop))
(preprocess (pps (ppx_compare ppx_sexp_conv -no-check))) (preprocess (pps (ppx_compare ppx_sexp_conv -no-check)))
(link_flags (-linkall -warn-error -31)))) (link_flags (-linkall -warn-error -31))))
|} |}
(String.concat " " infer_cflags) (String.concat " " infer_cflags) ]
(String.concat " " common_optflags) ]
@ ( List.map @ ( List.map
(fun source_dir -> (fun source_dir ->
[ Printf.sprintf "(copy_files# %s/*.ml{,i,l})" source_dir [ Printf.sprintf "(copy_files# %s/*.ml{,i,l})" source_dir

@ -7,5 +7,5 @@ Findlib has been successfully loaded. Additional directives:
Topfind.reset();; to force that packages will be reloaded Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads #thread;; to enable threads
n$2 n$13
false false

@ -6,6 +6,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# where to find toplevel.bc, can be overridden # where to find toplevel.bc, can be overridden
TOPLEVEL_DIR=${TOPLEVEL_DIR:-"$SCRIPT_DIR"/../infer/src/_build/default} TOPLEVEL_DIR=${TOPLEVEL_DIR:-"$SCRIPT_DIR"/../infer/src/_build/default}
INCLUDE_FLAGS=$(find "$TOPLEVEL_DIR" -type d -name '*.objs' -exec printf -- '-I {}\n' \;)
# The -init option is effective only in interactive mode. # The -init option is effective only in interactive mode.
# In batch mode, scripts need to import toplevel_init themselves. # In batch mode, scripts need to import toplevel_init themselves.
@ -20,9 +21,6 @@ set -x
cd "$SCRIPT_DIR"/../infer cd "$SCRIPT_DIR"/../infer
"$TOPLEVEL_DIR"/infertop.bc \ "$TOPLEVEL_DIR"/infertop.bc \
-init "$SCRIPT_DIR"/toplevel_init \ -init "$SCRIPT_DIR"/toplevel_init \
-I "$TOPLEVEL_DIR" \ $INCLUDE_FLAGS \
-I "$TOPLEVEL_DIR"/atd \
-I "$TOPLEVEL_DIR"/istd \
-I "$TOPLEVEL_DIR"/scripts \
-I "$SCRIPT_DIR" \ -I "$SCRIPT_DIR" \
"$@" "$@"

@ -16,6 +16,8 @@
open InferStdlib;; open InferStdlib;;
open InferGenerated;; open InferGenerated;;
open InferBase;;
open InferIR;;
open InferModules;; open InferModules;;
(* Most of infer uses this, useful for copy/pasting. Can be (partially) countered by typing `open (* Most of infer uses this, useful for copy/pasting. Can be (partially) countered by typing `open

Loading…
Cancel
Save