From 0b4254caa265030196776f3586fee0bc33f0b8cb Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 11 May 2020 04:37:24 -0700 Subject: [PATCH] integration/dune Summary: Pretty straightforward one. Reviewed By: skcho Differential Revision: D21440819 fbshipit-source-id: 70da086c3 --- .gitignore | 1 + infer/src/Makefile | 3 ++- infer/src/deadcode/Makefile | 4 ++-- infer/src/dune.in | 10 ++++++---- infer/src/integration/dune.in | 31 +++++++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 infer/src/integration/dune.in diff --git a/.gitignore b/.gitignore index 8850f866a..d1e52ca29 100644 --- a/.gitignore +++ b/.gitignore @@ -165,6 +165,7 @@ infer/src/.project /infer/src/dune /infer/src/al/dune /infer/src/clang/dune +/infer/src/integration/dune /infer/src/java/dune /infer/src/opensource/dune .merlin diff --git a/infer/src/Makefile b/infer/src/Makefile index c0de58c74..f0b89f2a4 100644 --- a/infer/src/Makefile +++ b/infer/src/Makefile @@ -76,7 +76,7 @@ GENERATED_FROM_AUTOCONF = dune.common ../dune-workspace base/Version.ml .PHONY: dune-workspace dune-workspace: ../dune-workspace -GENERATED_DUNES += dune al/dune clang/dune java/dune opensource/dune +GENERATED_DUNES += dune al/dune clang/dune integration/dune java/dune opensource/dune SRC_BUILD_COMMON = $(GENERATED_FROM_AUTOCONF) $(GENERATED_DUNES) $(OCAML_SOURCES) ifeq ($(BUILD_C_ANALYZERS),yes) @@ -245,6 +245,7 @@ dune: dune.in al/dune: al/dune.in clang/dune: clang/dune.in deadcode/dune: deadcode/dune.in +integration/dune: integration/dune.in java/dune: java/dune.in opensource/dune: opensource/dune.in diff --git a/infer/src/deadcode/Makefile b/infer/src/deadcode/Makefile index 6038a0f39..4978c38d4 100644 --- a/infer/src/deadcode/Makefile +++ b/infer/src/deadcode/Makefile @@ -50,8 +50,8 @@ endif # Note that we run find under _build directory. Since we copy some # sources from subfolders to src/ folder to avoid duplicates we use # $(DEPTH_ONE) and iteration over main and library folders. -LIBRARY_FOLDERS = . ./IR ./absint ./al ./atd ./backend ./base ./biabduction ./bufferoverrun ./c_stubs ./checkers ./clang ./concurrency ./cost ./istd ./java ./labs ./nullsafe ./pulse ./quandary ./scripts ./test_determinator ./topl -INCLUDE_FOLDERS = -I IR -I absint -I al -I atd -I backend -I base -I biabduction -I bufferoverrun -I c_stubs -I checkers -I clang -I concurrency -I cost -I istd -I java -I labs -I nullsafe -I pulse -I quandary -I scripts -I test_determinator -I topl +LIBRARY_FOLDERS = . ./IR ./absint ./al ./atd ./backend ./base ./biabduction ./bufferoverrun ./c_stubs ./checkers ./clang ./concurrency ./cost ./integration ./istd ./java ./labs ./nullsafe ./pulse ./quandary ./scripts ./test_determinator ./topl +INCLUDE_FOLDERS = -I IR -I absint -I al -I atd -I backend -I base -I biabduction -I bufferoverrun -I c_stubs -I checkers -I clang -I concurrency -I cost -I integration -I istd -I java -I labs -I nullsafe -I pulse -I quandary -I scripts -I test_determinator -I topl ml_src_files:=$(shell \ cd $(INFER_BUILD_DIR); \ diff --git a/infer/src/dune.in b/infer/src/dune.in index 2423bd40f..9e6ec8085 100644 --- a/infer/src/dune.in +++ b/infer/src/dune.in @@ -10,8 +10,7 @@ let ( ^/ ) = Filename.concat let source_dirs = - (if clang then ["unit" ^/ "clang"] else ["unit" ^/ "clang_stubs"]) - @ ["integration"; "unit"; "unit" ^/ "nullsafe"] + (if clang then ["unit" ^/ "clang"] else ["unit" ^/ "clang_stubs"]) @ ["unit"; "unit" ^/ "nullsafe"] let infer_binaries = ["infer"; "inferunit"] @ if facebook then ["InferCreateTraceViewLinks"] else [] @@ -80,7 +79,9 @@ let infer_cflags = ; "-open" ; "ASTLanguage" ; "-open" - ; "TestDeterminators" ] + ; "TestDeterminators" + ; "-open" + ; "Integration" ] @ (if java then [] else ["-open"; "JavaFrontendStubs"]) @ if clang then [] else ["-open"; "ClangFrontendStubs"] ) |> String.concat " " @@ -118,7 +119,8 @@ let main_lib_stanza = ; "backend" ; "ClangFrontend" ; "ASTLanguage" - ; "TestDeterminators" ] )) + ; "TestDeterminators" + ; "integration" ] )) (String.concat " " infer_binaries) diff --git a/infer/src/integration/dune.in b/infer/src/integration/dune.in new file mode 100644 index 000000000..1731bc488 --- /dev/null +++ b/infer/src/integration/dune.in @@ -0,0 +1,31 @@ +(* -*- tuareg -*- *) +(* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) +(* NOTE: prepend dune.common to this file! *) + +let library = + Format.sprintf + {| +(library + (name integration) + (public_name infer.integration) + (flags + (:standard + -open Core -open InferStdlib -open IStd -open OpenSource -open InferGenerated + -open InferBase -open InferIR -open Bo -open Costlib -open Concurrency -open Backend + -open TestDeterminators -open ClangFrontend -open ASTLanguage -open JavaFrontend %s %s)) + (libraries xmlm core InferStdlib InferGenerated InferBase InferIR bo costlib concurrency backend + TestDeterminators ClangFrontend ASTLanguage JavaFrontend) + (preprocess (pps ppx_compare)) +) +|} + (if clang then "" else "-open ClangFrontendStubs") + (if java then "" else "-open JavaFrontendStubs") + + +;; +Jbuild_plugin.V1.send library