These compiler outputs are irrelevant for the `resolc` compilation
pipeline. It can also break the compilation pipeline. For example, solc
may reject the code without via-ir or fail during the EVM codegen phase
with stack too deep errors - which is not relevant to us.
---------
Signed-off-by: xermicus <cyrill@parity.io>
### Description
Fixes output selection issues for `Foundry` usage.
- pruning to look at per file settings
- source to include `ast`
### Note
`Selection.files` field is reintroduced because that's the way `foundry`
functions. it uses per-file output selection
---------
Co-authored-by: xermicus <cyrill@parity.io>
- do not prune the AST output in standard JSON mode (required for
foundry)
- do not serialize the output format if there was not blob produced
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
Separate between compilation and linker phases to allow deploy time
linking and back-porting era compiler changes to fix#91. Unlinked
contract binaries (caused by missing libraries or missing factory
dependencies in turn) are emitted as raw ELF object.
Few drive by fixes:
- #98
- A compiler panic on missing libraries definitions.
- Fixes some incosistent type forwarding in JSON output (empty string
vs. null object).
- Remove the unused fallback for size optimization setting.
- Remove the broken `--lvm-ir` mode.
- CI workflow fixes.
---------
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
Signed-off-by: xermicus <bigcyrill@hotmail.com>
Signed-off-by: xermicus <cyrill@parity.io>
This is to address issue #320
## Introduced changes
- Added new_required_for_tests() method that includes EVM bytecode flags
- Modified new_required() to exclude evm.bytecode and
evm.deployedBytecode
- Updated test utilities to explicitly request EVM bytecode when needed
Signed-off-by: 0xf333 <0x333@tuta.io>
The data structure can be used to build the JSON input for `resolc` too.
In that case serializing of provided custom options should not be
dismissed.
Makes the memory settings struct more modular as a drive-by.
---------
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
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>
The differential testing framework will make a second consumer. There
seems to be no re-usable Rust crate for this. But we already have
everything here, just needs a small refactor to make it fully re-usable.
- Mostly decouple the solc JSON-input-output interface types from the
`solidity` frontend crate
- Expose the JSON-input-output interface types in a dedicated crate
---------
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>