https://bugs.llvm.org/show_bug.cgi?id=41383

            Bug ID: 41383
           Summary: wasm32: Import module directive no longer preserved
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

It looks like LLVM may have regressed recently by accident after the 8.0
release? Some local testing with tip-of-tree in a local Rust compiler for the
wasm target shows that this IR:



declare void @foo() #1                          

define void @bar() {                            
  call void @foo()                              
  ret void                                      
}                                               

attributes #1 = { "wasm-import-module"="test" } 




when compiled:


  $ llc foo.ll -filetype=obj -mtriple=wasm32-unknown-unknown -o foo.o
  $ wasm-ld foo.o -o foo.wasm --no-entry --allow-undefined --export-dynamic
  $ wasm2wat foo.wasm | grep import
  (import "env" "foo" (func $foo (type 0)))



it looks like the name of the wasm import module, "test", was lost?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to