16 Commits

Author SHA1 Message Date
Alessandro Di Federico 0385e4c652 Introduce revng::Configuration 2026-04-23 13:40:43 +02:00
Giacomo Vercesi 6e7efc835b InitRevng: fix memory leak due to stack trace
When initializing `revng::InitRevng` it is assumed by its parent,
`InitLLVM`, that the lifetime of `Argv` and be equivalent to
static, because it might be later retrieved to print it in case of a
crash. This works with the traditional `main`, however in the pipebox
the string passed are not guaranteed to have that lifetime. This commits
moves ownership of the strings to a class that stores them to avoid this
problem.
2025-12-12 15:46:49 +01:00
Alessandro Di Federico bce32d9669 Default to --emit-hex-constant-literals-from=4096 2025-11-28 11:21:18 +01:00
Giacomo Vercesi 1c07656448 pipebox.py: add initialize function
Add the `initialize` function to `pipebox.py`. This allows passing
command-line arguments to the pipebox.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 153fcf2773 InitRevng: initialize LLVM components
In the constructor of `InitRevng` also call all the `llvm::initialize*`
functions. This is done to be less implementation-specific and having
these functions be called in
`LLVMPipelineRegistry.libraryInitialization`.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 65ce5c1224 InitRevng: check for double initialization
In the constructor of `InitRevng` check that the class has only been
initialized once.
2025-11-17 10:04:13 +01:00
Ivan Krysak 4d35551f14 Introduce a debug information preservation style
It's guarded behind the
`EnableStrictDebugInformationPreservationStyle`
option.
2025-09-10 17:44:02 +02:00
Giacomo Vercesi ca66b4ddfc InitRevng: fix command line parsing
This commit fixes command line parsing of revng through the
REVNG_OPTIONS environment variable. Previously the env was prepended to
the actual command-line variables, now it's appended, allowing to
specify command line arguments that depend on `-load`s.
2024-01-26 17:46:21 +01:00
Giacomo Vercesi 6d03b5874e InitRevng: HideUnrelatedOptions only when provided
Avoid calling `HideUnrelatedOptions` in InitRevng if the
`CategoriesToHide` option is empty.
2023-11-03 18:29:10 +01:00
Giacomo Vercesi dc90bca33e revng/Support: split part of Statistics in OnQuit
Split the OnQuit functionality of Statistics as a separate header and
object file. Rework the interface to use lambdas instead of the
OnQuitInterface.
2023-09-06 15:23:43 +02:00
Alessandro Di Federico f120ad334c Statistics.h: rework 2023-06-30 13:06:58 +02:00
Alessandro Di Federico 4b2e067574 rcc: ban functions we wrap 2023-04-28 14:34:52 +02:00
Alessandro Di Federico f68185abc9 Push ParseCommandLineOptions into InitRevng 2023-04-28 14:34:35 +02:00
Ivan Krysak 11c0d7f02e Stop using \brief doxygen command 2023-03-15 10:19:01 +01:00
Davide Depau 4c0576c1e4 Set custom crash error message 2022-07-22 21:04:03 +02:00
Davide Depau 4f06a26105 Introduce CLI initialization utility 2022-07-22 21:04:03 +02:00