mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-15 09:11:04 +00:00
Suport passing arbitrary llvm arguments (#271)
- Support for passing LLVM command line options via the prcoess input or providing one or more `--llvm-arg='..'` resolc CLI flag. This allows more fine-grained control over the LLVM backend configuration. - Make LLVM initialization idempotent. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -20,6 +20,8 @@ pub struct Input {
|
||||
pub optimizer_settings: revive_llvm_context::OptimizerSettings,
|
||||
/// The debug output config.
|
||||
pub debug_config: revive_llvm_context::DebugConfig,
|
||||
/// The extra LLVM arguments give used for manual control.
|
||||
pub llvm_arguments: Vec<String>,
|
||||
}
|
||||
|
||||
impl Input {
|
||||
@@ -30,6 +32,7 @@ impl Input {
|
||||
include_metadata_hash: bool,
|
||||
optimizer_settings: revive_llvm_context::OptimizerSettings,
|
||||
debug_config: revive_llvm_context::DebugConfig,
|
||||
llvm_arguments: Vec<String>,
|
||||
) -> Self {
|
||||
Self {
|
||||
contract,
|
||||
@@ -37,6 +40,7 @@ impl Input {
|
||||
include_metadata_hash,
|
||||
optimizer_settings,
|
||||
debug_config,
|
||||
llvm_arguments,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user