Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## wasm_split_cli vfuture

- Experimental support to emit debug sections. By default enabled via environment variable
`WASM_SPLIT_CLI_ENABLE_DWARF`. The current setup duplicates the DWARF information into
all output modules, which can lead to large split files.

## wasm_split_helpers v0.2.3

- Propagate `debug_assertions` to the CLI with a new marker in the hidden `#[link_section]`.
Expand Down
25 changes: 25 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/wasm_split_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ wasmparser = "0.252"
# bin-only depdencies
clap = { version = "4.5", features = ["derive"], optional = true }
tracing-subscriber = { version = "0.3", features = ["fmt"], optional = true }
gimli = { version = "0.34.0", default-features = false, features = ["std", "read", "write"] }

[dev-dependencies]
tempfile = "3.27.0"
Expand Down
6 changes: 4 additions & 2 deletions crates/wasm_split_cli/src/dep_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ pub fn get_dependencies(module: &InputModule) -> Result<Dependencies> {
RelocDetails::TableNumber(details) => Some(DepNode::Table(details.index)),
RelocDetails::GlobalIndex(details) => Some(DepNode::Global(details.index)),
RelocDetails::TagIndex(details) => Some(DepNode::Tag(details.index)),
RelocDetails::FunctionOffset(details) => Some(DepNode::Function(details.index)),
RelocDetails::SectionOffset(_) => None,
};
if let Some(target) = target {
self.add_dep(a, target);
Expand Down Expand Up @@ -146,7 +148,7 @@ fn iter_functions_with_relocs<'m>(
module: &'m InputModule,
) -> impl Iterator<Item = Result<(InputFuncId, &'m RelocationEntry)>> {
let code_relocs = module.reloc_info.iter_code_relocs();
let code_section_offset = module.reloc_info.code_section_offset();
let code_section_offset = module.reloc_info.code_section_reloc_base();
let mut function_index = 0;
code_relocs.map(move |entry| {
let reloc_file_range = shift_range(entry.relocation_range()?, code_section_offset);
Expand Down Expand Up @@ -275,7 +277,7 @@ macro_rules! emit_iter_err {
fn iter_data_dependencies<'m>(
module: &'m InputModule,
) -> impl Iterator<Item = Result<DataDependency<'m>>> {
let data_section_offset = module.reloc_info.data_section_offset();
let data_section_offset = module.reloc_info.data_section_reloc_base();
let mut data_relocs = module.reloc_info.iter_data_relocs().peekable();
let mut data_symbols = module.reloc_info.data_symbols.iter().peekable();

Expand Down
Loading