mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-07-20 11:05:43 +00:00
update and fix the linker (#140)
This commit is contained in:
Generated
+392
-477
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -51,10 +51,10 @@ path-slash = "0.2"
|
|||||||
rayon = "1.8"
|
rayon = "1.8"
|
||||||
clap = { version = "4", default-features = false, features = ["derive"] }
|
clap = { version = "4", default-features = false, features = ["derive"] }
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
polkavm-common = "0.17"
|
polkavm-common = "0.18"
|
||||||
polkavm-linker = "0.17.1"
|
polkavm-linker = "0.18"
|
||||||
polkavm-disassembler = "0.17"
|
polkavm-disassembler = "0.18"
|
||||||
polkavm = "0.17"
|
polkavm = "0.18"
|
||||||
alloy-primitives = { version = "0.8", features = ["serde"] }
|
alloy-primitives = { version = "0.8", features = ["serde"] }
|
||||||
alloy-sol-types = "0.8"
|
alloy-sol-types = "0.8"
|
||||||
alloy-genesis = "0.3"
|
alloy-genesis = "0.3"
|
||||||
@@ -68,7 +68,7 @@ git2 = "0.19.0"
|
|||||||
# polkadot-sdk and friends
|
# polkadot-sdk and friends
|
||||||
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
|
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
|
||||||
scale-info = { version = "2.11.1", default-features = false }
|
scale-info = { version = "2.11.1", default-features = false }
|
||||||
polkadot-sdk = { git = "https://github.com/paritytech/polkadot-sdk", rev = "ddfc608962febad82f154dc1ec39768d6675b329" }
|
polkadot-sdk = { git = "https://github.com/paritytech/polkadot-sdk", rev = "ef8886570ea692133c6b49ecb2f1117c0a366ebd" }
|
||||||
|
|
||||||
# llvm
|
# llvm
|
||||||
[workspace.dependencies.inkwell]
|
[workspace.dependencies.inkwell]
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"Baseline": 1099,
|
"Baseline": 1110,
|
||||||
"Computation": 2378,
|
"Computation": 2389,
|
||||||
"DivisionArithmetics": 14454,
|
"DivisionArithmetics": 14822,
|
||||||
"ERC20": 22731,
|
"ERC20": 23973,
|
||||||
"Events": 1593,
|
"Events": 1605,
|
||||||
"FibonacciIterative": 1643,
|
"FibonacciIterative": 2023,
|
||||||
"Flipper": 1978,
|
"Flipper": 1989,
|
||||||
"SHA1": 16801
|
"SHA1": 17026
|
||||||
}
|
}
|
||||||
@@ -57,6 +57,7 @@ pub fn link<T: AsRef<[u8]>>(input: T) -> anyhow::Result<Vec<u8>> {
|
|||||||
"--relocatable",
|
"--relocatable",
|
||||||
"--emit-relocs",
|
"--emit-relocs",
|
||||||
"--no-relax",
|
"--no-relax",
|
||||||
|
"--unique",
|
||||||
"--gc-sections",
|
"--gc-sections",
|
||||||
"--library-path",
|
"--library-path",
|
||||||
dir.path().to_str().expect("should be utf8"),
|
dir.path().to_str().expect("should be utf8"),
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ where
|
|||||||
runtime::FUNCTION_LOAD_IMMUTABLE_DATA,
|
runtime::FUNCTION_LOAD_IMMUTABLE_DATA,
|
||||||
context.void_type().fn_type(Default::default(), false),
|
context.void_type().fn_type(Default::default(), false),
|
||||||
0,
|
0,
|
||||||
Some(inkwell::module::Linkage::Private),
|
Some(inkwell::module::Linkage::External),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ impl<'ctx> Global<'ctx> {
|
|||||||
.add_global(r#type, Some(address_space.into()), name);
|
.add_global(r#type, Some(address_space.into()), name);
|
||||||
let global = Self { r#type, value };
|
let global = Self { r#type, value };
|
||||||
|
|
||||||
global.value.set_linkage(inkwell::module::Linkage::Private);
|
global.value.set_linkage(inkwell::module::Linkage::External);
|
||||||
global
|
global
|
||||||
.value
|
.value
|
||||||
.set_visibility(inkwell::GlobalVisibility::Default);
|
.set_visibility(inkwell::GlobalVisibility::Default);
|
||||||
|
|||||||
Binary file not shown.
@@ -1163,7 +1163,7 @@ where
|
|||||||
self.name.as_str(),
|
self.name.as_str(),
|
||||||
function_type,
|
function_type,
|
||||||
output_size,
|
output_size,
|
||||||
Some(inkwell::module::Linkage::Private),
|
Some(inkwell::module::Linkage::External),
|
||||||
)?;
|
)?;
|
||||||
function
|
function
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ where
|
|||||||
self.identifier.as_str(),
|
self.identifier.as_str(),
|
||||||
function_type,
|
function_type,
|
||||||
self.result.len(),
|
self.result.len(),
|
||||||
Some(inkwell::module::Linkage::Private),
|
Some(inkwell::module::Linkage::External),
|
||||||
)?;
|
)?;
|
||||||
revive_llvm_context::PolkaVMFunction::set_attributes(
|
revive_llvm_context::PolkaVMFunction::set_attributes(
|
||||||
context.llvm(),
|
context.llvm(),
|
||||||
|
|||||||
Reference in New Issue
Block a user