Skip to content

Commit

Permalink
Use stdlib.c and pthread.c stubs only when library activated
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Apr 3, 2023
1 parent 818a06c commit 9c17fdc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/maingoblint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,11 @@ let preprocess_files () =

let extra_files = ref [] in

extra_files := find_custom_include (Fpath.v "stdlib.c") :: find_custom_include (Fpath.v "pthread.c") :: !extra_files;
if List.mem "c" (get_string_list "lib.activated") then
extra_files := find_custom_include (Fpath.v "stdlib.c") :: !extra_files;

if List.mem "pthread" (get_string_list "lib.activated") then
extra_files := find_custom_include (Fpath.v "pthread.c") :: !extra_files;

if List.mem "sv-comp" (get_string_list "lib.activated") then
extra_files := find_custom_include (Fpath.v "sv-comp.c") :: !extra_files;
Expand Down

0 comments on commit 9c17fdc

Please sign in to comment.