[llvm-bugs] [Bug 43211] New: [wasm] __import_module__, __import_name__ attributes do not work with -flto

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 3 11:26:11 PDT 2019


            Bug ID: 43211
           Summary: [wasm] __import_module__, __import_name__ attributes
                    do not work with -flto
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: alonzakai at gmail.com
                CC: llvm-bugs at lists.llvm.org

extern void foo() __attribute__((__import_module__("module"),

int main() {

Building with say


the output contains

 (import "module" "base" (func $foo\28\29))

However, adding -flto to that command breaks things - it now imports as

 (import "env" "_Z3foov" (func $foo\28\29))

Perhaps the attributes information is supported in wasm object files but not in
LLVM bitcode files?

This affects wasi which uses those attributes.

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/20190903/05ce554e/attachment-0001.html>

More information about the llvm-bugs mailing list