Skip to content

Commit

Permalink
feat: add the lld llvm-config request
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgar2017 committed Apr 26, 2024
1 parent 7c85964 commit 7abcfe1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 24 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions compiler_tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ zkevm_opcode_defs = { git = "https://github.com/matter-labs/era-zkevm_opcode_def
zkevm_tester = { git = "https://github.com/matter-labs/era-zkevm_tester", branch = "v1.4.1" }

era-compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" }
era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }
era-compiler-vyper = { git = "https://github.com/matter-labs/era-compiler-vyper", branch = "main" }
era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "az-cpr-1664-support-linking-deploy-and-runtime-code" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "az-cpr-1664-support-linking-deploy-and-runtime-code" }
era-compiler-vyper = { git = "https://github.com/matter-labs/era-compiler-vyper", branch = "az-cpr-1664-support-linking-deploy-and-runtime-code" }

# era-compiler-common = { path = "../../era-compiler-common" }
# era-compiler-llvm-context = { path = "../../era-compiler-llvm-context" }
Expand All @@ -67,6 +67,6 @@ features = ["blocking"]

[dependencies.inkwell]
git = "https://github.com/matter-labs-forks/inkwell"
branch = "llvm-17"
branch = "az-cpr-1664-support-linking-deploy-and-runtime-code"
default-features = false
features = ["llvm17-0", "no-libffi-linking", "target-eravm", "target-evm"]
5 changes: 2 additions & 3 deletions compiler_tester/src/compilers/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ impl Compiler for LLVMCompiler {
.map_err(|error| anyhow::anyhow!(error.to_string()))?;
let optimizer =
era_compiler_llvm_context::Optimizer::new(mode.llvm_optimizer_settings.clone());
let source_hash = sha3::Keccak256::digest(source.as_bytes()).into();

let context = era_compiler_llvm_context::EVMContext::<
era_compiler_llvm_context::EVMDummyDependency,
Expand All @@ -133,8 +132,8 @@ impl Compiler for LLVMCompiler {
true,
debug_config.clone(),
);
let build = context.build(path, Some(source_hash))?;
let build = EVMBuild::new(era_compiler_llvm_context::EVMBuild::default(), build);
let build = context.build(path, None)?;
let build = EVMBuild::new(build.as_slice().to_vec(), vec![]);

Ok((path.to_owned(), build))
})
Expand Down
9 changes: 3 additions & 6 deletions compiler_tester/src/vm/evm/input/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
#[derive(Debug, Clone)]
pub struct Build {
/// The contract deploy build.
pub deploy_build: era_compiler_llvm_context::EVMBuild,
pub deploy_build: Vec<u8>,
/// The contract runtime build.
pub runtime_build: era_compiler_llvm_context::EVMBuild,
pub runtime_build: Vec<u8>,
}

impl Build {
///
/// A shortcut constructor.
///
pub fn new(
deploy_build: era_compiler_llvm_context::EVMBuild,
runtime_build: era_compiler_llvm_context::EVMBuild,
) -> Self {
pub fn new(deploy_build: Vec<u8>, runtime_build: Vec<u8>) -> Self {
Self {
deploy_build,
runtime_build,
Expand Down
4 changes: 2 additions & 2 deletions compiler_tester/src/vm/evm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ impl<'evm> EVM<'evm> {
constructor_args: Vec<u8>,
) -> anyhow::Result<ExecutionResult> {
let bytecode = self.known_contracts.values().next().unwrap();
let mut deploy_code = bytecode.deploy_build.bytecode.to_owned();
let mut deploy_code = bytecode.deploy_build.to_owned();
deploy_code.extend(constructor_args);
let runtime_code = bytecode.runtime_build.bytecode.to_owned();
let runtime_code = bytecode.runtime_build.to_owned();

self.runtime
.balances
Expand Down
4 changes: 2 additions & 2 deletions fuzzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ libfuzzer-sys = "0.4"
zkevm-assembly = { git = "https://github.com/matter-labs/era-zkEVM-assembly", branch = "v1.4.1" }
zkevm_tester = { git = "https://github.com/matter-labs/era-zkevm_tester", branch = "v1.4.1" }

era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }
era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "az-cpr-1664-support-linking-deploy-and-runtime-code" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "az-cpr-1664-support-linking-deploy-and-runtime-code" }

compiler-tester = { path = "../compiler_tester" }
solidity-adapter = { path = "../solidity_adapter" }
2 changes: 1 addition & 1 deletion solidity
Submodule solidity updated 79 files
+5 −0 Changelog.md
+5 −0 docs/_static/css/toggle.css
+25 −12 docs/contracts/errors.rst
+17 −12 docs/control-structures.rst
+1 −1 docs/internals/optimizer.rst
+5 −9 docs/introduction-to-smart-contracts.rst
+4 −5 docs/types/conversion.rst
+6 −0 libsmtutil/Z3Interface.cpp
+1 −0 libsolidity/analysis/GlobalContext.cpp
+25 −2 libsolidity/analysis/PostTypeChecker.cpp
+1 −0 libsolidity/analysis/PostTypeChecker.h
+1 −1 libsolidity/analysis/SyntaxChecker.cpp
+3 −2 libsolidity/ast/TypeProvider.cpp
+1 −1 libsolidity/ast/TypeProvider.h
+10 −2 libsolidity/ast/Types.cpp
+3 −0 libsolidity/ast/Types.h
+6 −0 libsolidity/codegen/ExpressionCompiler.cpp
+78 −0 libsolidity/codegen/YulUtilFunctions.cpp
+16 −0 libsolidity/codegen/YulUtilFunctions.h
+40 −43 libsolidity/codegen/ir/IRGeneratorForStatements.cpp
+1 −0 libsolidity/codegen/ir/IRGeneratorForStatements.h
+1 −4 libsolidity/interface/CompilerStack.cpp
+6 −1 libsolidity/interface/StandardCompiler.cpp
+43 −0 libsolutil/CommonData.h
+19 −18 libyul/optimiser/SSATransform.cpp
+5 −15 libyul/optimiser/Suite.cpp
+32 −14 scripts/common/cmdline_helpers.py
+9 −2 solc/CommandLineParser.cpp
+1 −0 test/cmdlineTests/require_overload/err
+1 −0 test/cmdlineTests/require_with_error_ir/args
+17 −0 test/cmdlineTests/require_with_error_ir/input.sol
+267 −0 test/cmdlineTests/require_with_error_ir/output
+25 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_empty_sequence_metadata/input.json
+19 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_empty_sequence_metadata/output.json
+25 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_empty_sequence_whitespaces_metadata/input.json
+19 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_empty_sequence_whitespaces_metadata/output.json
+2 −2 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_no_yul/output.json
+19 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_no_yul_empty_string/input.json
+12 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_no_yul_empty_string/output.json
+19 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_no_yul_whitespaces/input.json
+12 −0 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_no_yul_whitespaces/output.json
+1 −0 test/cmdlineTests/yul_optimizer_disabled_sequence_empty/args
+3 −0 test/cmdlineTests/yul_optimizer_disabled_sequence_empty/input.sol
+4 −0 test/cmdlineTests/yul_optimizer_disabled_sequence_empty/output
+1 −1 test/cmdlineTests/yul_optimizer_steps_disabled/err
+13 −0 test/cmdlineTests/~bytecode_equivalence_with_unused_contracts/inputs.sol
+65 −0 test/cmdlineTests/~bytecode_equivalence_with_unused_contracts/test.py
+4 −0 test/cmdlineTests/~documentation_examples/test.sh
+4 −4 test/libsolidity/ASTJSON/used_errors.json
+21 −0 test/libsolidity/semanticTests/errors/require_different_errors_same_parameters.sol
+20 −0 test/libsolidity/semanticTests/errors/require_error_function_pointer_parameter.sol
+20 −0 test/libsolidity/semanticTests/errors/require_error_multiple_arguments.sol
+20 −0 test/libsolidity/semanticTests/errors/require_error_string_literal.sol
+22 −0 test/libsolidity/semanticTests/errors/require_error_string_memory.sol
+20 −0 test/libsolidity/semanticTests/errors/require_error_uint256.sol
+28 −0 test/libsolidity/semanticTests/errors/require_evaluation_order.sol
+17 −0 test/libsolidity/semanticTests/errors/require_inherited_error.sol
+11 −0 test/libsolidity/smtCheckerTests/operators/ternary_operator_with_functions.sol
+18 −0 test/libsolidity/smtCheckerTests/operators/ternary_operator_with_tuple.sol
+1 −1 test/libsolidity/syntaxTests/abiEncoder/abi_encodeCall_tuple_from_error_event.sol
+1 −1 test/libsolidity/syntaxTests/abiEncoder/abi_encodeCall_tuple_from_invalid_operator.sol
+9 −0 test/libsolidity/syntaxTests/errors/abi_decode_error_constructor.sol
+8 −0 test/libsolidity/syntaxTests/errors/abi_encode_error_constructor.sol
+1 −1 test/libsolidity/syntaxTests/errors/assert_with_error.sol
+2 −1 test/libsolidity/syntaxTests/errors/require_custom.sol
+8 −0 test/libsolidity/syntaxTests/errors/require_custom_legacy.sol
+15 −0 test/libsolidity/syntaxTests/errors/require_nested.sol
+1 −1 test/libsolidity/syntaxTests/errors/selector_on_instance.sol
+1 −1 test/libsolidity/syntaxTests/parsing/lexer_numbers_with_underscores_decimal_fail.sol
+1 −1 test/libsolidity/syntaxTests/parsing/lexer_numbers_with_underscores_fixed_fail.sol
+1 −1 test/libsolidity/syntaxTests/parsing/lexer_numbers_with_underscores_hex_fail.sol
+1 −1 test/libsolidity/syntaxTests/revertStatement/error_used_elsewhere.sol
+13 −0 test/libsolidity/syntaxTests/revertStatement/require_nested.sol
+20 −0 test/libsolidity/syntaxTests/types/hex_string_to_bytesNN_different_size_implicit.sol
+1 −2 test/libyul/YulOptimizerTest.cpp
+3 −4 test/libyul/YulOptimizerTestCommon.cpp
+4 −4 test/libyul/yulOptimizerTests/ssaTransform/function.yul
+23 −0 test/solc/CommandLineInterface.cpp
+25 −4 test/solc/CommandLineParser.cpp

0 comments on commit 7abcfe1

Please sign in to comment.