From f6f487e280146dc81c3e0a1dd885670e63cca320 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Thu, 27 Jan 2022 17:20:10 +0100 Subject: [PATCH] Add option `include_stdlib` to toggle inclusion of Goblint's stdlib.c --- src/maingoblint.ml | 5 ++++- src/util/options.schema.json | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/maingoblint.ml b/src/maingoblint.ml index e664ef1de1..52722a8381 100644 --- a/src/maingoblint.ml +++ b/src/maingoblint.ml @@ -280,7 +280,10 @@ let preprocess_files () = let extra_arg_files = ref [] in - extra_arg_files := find_custom_include "stdlib.c" :: find_custom_include "pthread.c" :: !extra_arg_files; + if get_bool "include_stdlib" then + extra_arg_files := find_custom_include "stdlib.c" :: !extra_arg_files; + + extra_arg_files := find_custom_include "pthread.c" :: !extra_arg_files; if get_bool "ana.sv-comp.functions" then extra_arg_files := find_custom_include "sv-comp.c" :: !extra_arg_files; diff --git a/src/util/options.schema.json b/src/util/options.schema.json index 668857c705..073ee9d0ab 100644 --- a/src/util/options.schema.json +++ b/src/util/options.schema.json @@ -29,6 +29,12 @@ "items": { "type": "string" }, "default": [] }, + "include_stdlib" : { + "title": "include_stdlib", + "description": "Include Goblint's stdlib.c (containing defintions of bsearch and qsort).", + "type": "boolean", + "default": true + }, "kernel-root": { "title": "kernel-root", "description": "Root directory for Linux kernel (linux-headers)",