mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-21 09:11:02 +00:00
expose custom PVM settings in the standard json interface (#318)
Exposes the following PolkaVM specific options via the standard json interface: - Heap size - Stack size - Whether to emit source level debug information Additionally it is now forbidden to specify those as CLI option in standard JSON mode. They are bytecode altering options and having multiple ways to specify them creates unnecessary room for confusion: The standard JSON input description should be sufficient and succint for reproducible builds. Closes #290 --------- Signed-off-by: xermicus <bigcyrill@hotmail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ use crate::standard_json::input::settings::optimizer::Optimizer as SolcStandardJ
|
||||
use crate::standard_json::input::settings::selection::Selection as SolcStandardJsonInputSettingsSelection;
|
||||
#[cfg(feature = "resolc")]
|
||||
use crate::warning::Warning;
|
||||
use crate::SolcStandardJsonInputSettingsPolkaVM;
|
||||
|
||||
use self::language::Language;
|
||||
use self::settings::Settings;
|
||||
@@ -63,6 +64,7 @@ impl Input {
|
||||
optimizer: SolcStandardJsonInputSettingsOptimizer,
|
||||
metadata: Option<SolcStandardJsonInputSettingsMetadata>,
|
||||
#[cfg(feature = "resolc")] suppressed_warnings: Option<Vec<Warning>>,
|
||||
polkavm: Option<SolcStandardJsonInputSettingsPolkaVM>,
|
||||
) -> anyhow::Result<Self> {
|
||||
let mut paths: BTreeSet<PathBuf> = paths.iter().cloned().collect();
|
||||
let libraries = Settings::parse_libraries(library_map)?;
|
||||
@@ -90,6 +92,7 @@ impl Input {
|
||||
output_selection,
|
||||
optimizer,
|
||||
metadata,
|
||||
polkavm,
|
||||
),
|
||||
#[cfg(feature = "resolc")]
|
||||
suppressed_warnings,
|
||||
@@ -109,6 +112,7 @@ impl Input {
|
||||
optimizer: SolcStandardJsonInputSettingsOptimizer,
|
||||
metadata: Option<SolcStandardJsonInputSettingsMetadata>,
|
||||
suppressed_warnings: Option<Vec<Warning>>,
|
||||
polkavm: Option<SolcStandardJsonInputSettingsPolkaVM>,
|
||||
) -> anyhow::Result<Self> {
|
||||
#[cfg(feature = "parallel")]
|
||||
let iter = sources.into_par_iter(); // Parallel iterator
|
||||
@@ -129,6 +133,7 @@ impl Input {
|
||||
output_selection,
|
||||
optimizer,
|
||||
metadata,
|
||||
polkavm,
|
||||
),
|
||||
suppressed_warnings,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user