mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-30 15:39:52 +00:00
Separate compilation and linker phases (#376)
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 commit is contained in:
1 parent
13faedf08a
commit
94ec34c4d5
169 files changed
+6288
-5206
No files matched your search
@@ -1,24 +1,23 @@
|
||||
//! The tests for running resolc with standard JSON option.
|
||||
|
||||
#![cfg(test)]
|
||||
|
||||
use crate::tests::cli::utils;
|
||||
use crate::tests::cli::utils::{
|
||||
assert_command_success, assert_equal_exit_codes, execute_resolc_with_stdin_input,
|
||||
execute_solc_with_stdin_input, STANDARD_JSON_CONTRACTS_PATH,
|
||||
};
|
||||
|
||||
const JSON_OPTION: &str = "--standard-json";
|
||||
|
||||
#[test]
|
||||
fn runs_with_valid_input_file() {
|
||||
let arguments = &[JSON_OPTION];
|
||||
let resolc_result =
|
||||
utils::execute_resolc_with_stdin_input(arguments, utils::STANDARD_JSON_CONTRACTS_PATH);
|
||||
utils::assert_command_success(&resolc_result, "Providing a valid input file to stdin");
|
||||
let resolc_result = execute_resolc_with_stdin_input(arguments, STANDARD_JSON_CONTRACTS_PATH);
|
||||
assert_command_success(&resolc_result, "Providing a valid input file to stdin");
|
||||
|
||||
assert!(
|
||||
resolc_result.stdout.contains("contracts"),
|
||||
"Expected the output to contain a `contracts` field."
|
||||
);
|
||||
|
||||
let solc_result =
|
||||
utils::execute_solc_with_stdin_input(arguments, utils::STANDARD_JSON_CONTRACTS_PATH);
|
||||
utils::assert_equal_exit_codes(&solc_result, &resolc_result);
|
||||
let solc_result = execute_solc_with_stdin_input(arguments, STANDARD_JSON_CONTRACTS_PATH);
|
||||
assert_equal_exit_codes(&solc_result, &resolc_result);
|
||||
}
|
||||
Reference in new issue
Block a user