1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980(**************************************************************************)(* *)(* This file is part of Frama-C. *)(* *)(* Copyright (C) 2007-2024 *)(* CEA (Commissariat à l'énergie atomique et aux énergies *)(* alternatives) *)(* *)(* you can redistribute it and/or modify it under the terms of the GNU *)(* Lesser General Public License as published by the Free Software *)(* Foundation, version 2.1. *)(* *)(* It is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Lesser General Public License for more details. *)(* *)(* See the GNU Lesser General Public License version 2.1 *)(* for more details (enclosed in the file licenses/LGPLv2.1). *)(* *)(**************************************************************************)letdisable_other_analyzers()=ifOptions.Run.get()thenletselection=State_selection.diff(Parameter_state.get_selection())(State_selection.union(State_selection.of_list(Kernel.CodeOutput.self::Options.states))(* The command-line options that govern the creation of the AST
must be preserved *)(State_selection.with_codependenciesAst.self))inProject.clear~selection()let()=Cmdline.run_after_configuring_stagedisable_other_analyzersletforce_run()=ifnot(Dictionary.is_computed())thenbeginletold_printer=Printer.current_printer()inObfuscate.obfuscate();ifOptions.Dictionary.is_default()thenLog.print_delayedDictionary.prettyelsebeginletfile=Options.Dictionary.get()intryletcout=open_outfileinletfmt=Format.formatter_of_out_channelcoutinDictionary.prettyfmtwithSys_error_asexn->Options.error"@[cannot generate the dictionary into file `%s':@ %s@]"file(Printexc.to_stringexn)end;File.pretty_ast();Printer.set_printerold_printerendletforce_run=Dynamic.register~plugin:"Obfuscator""force_run"(Datatype.funcDatatype.unitDatatype.unit)force_runletrun()=ifOptions.Run.get()thenbeginforce_run();Cmdline.bail_out()(* stop Frama-C as specified by the -help message
and by the discussion in Gitlab issue #491 *)endlet()=Boot.Main.extendrun(*
Local Variables:
compile-command: "make -C ../../.."
End:
*)