Skip to content

Commit 9fc43f8

Browse files
authored
Merge pull request #752 from alexcrichton/remove-hack
Remove a hack around an LLVM bug
2 parents 856892d + 4f4da74 commit 9fc43f8

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

crates/cli-support/src/lib.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ fn extract_programs(module: &mut Module) -> Result<Vec<shared::Program>, Error>
322322
to_remove.push(i);
323323

324324
let mut payload = custom.payload();
325-
let mut added_programs = Vec::new();
326325
while payload.len() > 0 {
327326
let len = ((payload[0] as usize) << 0)
328327
| ((payload[1] as usize) << 8)
@@ -331,19 +330,6 @@ fn extract_programs(module: &mut Module) -> Result<Vec<shared::Program>, Error>
331330
let (a, b) = payload[4..].split_at(len as usize);
332331
payload = b;
333332

334-
// Due to a nasty LLVM bug it's currently possible for LLVM to
335-
// duplicate custom section directives in intermediate object files.
336-
// This means that we could see multiple program directives when in
337-
// fact we were originally only meant to see one!
338-
//
339-
// Work around the issue here until the upstream bug,
340-
// https://bugs.llvm.org/show_bug.cgi?id=38184, is hopefully fixed
341-
// via some other means.
342-
if added_programs.iter().any(|p| a == *p) {
343-
continue
344-
}
345-
added_programs.push(a);
346-
347333
let p: shared::ProgramOnlySchema = match serde_json::from_slice(&a) {
348334
Ok(f) => f,
349335
Err(e) => bail!("failed to decode what looked like wasm-bindgen data: {}", e),

0 commit comments

Comments
 (0)