[llvm-bugs] [Bug 41383] New: wasm32: Import module directive no longer preserved

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 4 11:48:44 PDT 2019


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: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
                    sbc at chromium.org

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190404/c2d2667e/attachment.html>


More information about the llvm-bugs mailing list