[llvm-bugs] [Bug 47312] New: DIFile instructions in LLVM bitcode do not get emitted to source maps

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 25 18:01:10 PDT 2020


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

            Bug ID: 47312
           Summary: DIFile instructions in LLVM bitcode do not get emitted
                    to source maps
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: scott.waye at hubse.com
                CC: llvm-bugs at lists.llvm.org

I could be missing how this works in that my bitcode may be wrong/missing
something, but I have in the bitcode

```
!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "ILC",
isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug,
splitDebugInlining: false)
!1 = !DIFile(filename: "MathHelpers.cs", directory:
"corert/src/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers")
```
 But when compiling (and I'm using the emscripten front end  with the -g4
--source-map-base options), the source files are not written out.

I compile the bitcode to wasm object with 

```
E:\GitHub\emsdk\upstream\emscripten\emcc.bat
"E:\GitHub\corert\tests\src\Simple\HelloWasm\obj\Debug\wasm\native\HelloWasm.bc"
-c -o
"E:\GitHub\corert\tests\src\Simple\HelloWasm\obj\Debug\wasm\native\HelloWasm.o"
-s WASM=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_EXCEPTION_CATCHING=0 -g4
```
and then link with
```
"E:\GitHub\emsdk\upstream\emscripten\emcc.bat"
"E:\GitHub\corert\tests\src\Simple\HelloWasm\obj\Debug\wasm\native\HelloWasm.o"
-o
"E:\GitHub\corert\tests\src\Simple\HelloWasm\bin\Debug\wasm\native\HelloWasm.html"
-s WASM=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_EXCEPTION_CATCHING=0 -s
WASM_MEM_MAX=200Mb --emrun
"E:\GitHub\corert\tests\\..\bin\WebAssembly.wasm.Debug/sdk/libPortableRuntime.a"
"E:\GitHub\corert\tests\\..\bin\WebAssembly.wasm.Debug/sdk/libbootstrappercpp.a"
"E:\GitHub\corert\tests\\..\bin\WebAssembly.wasm.Debug/sdk/libSystem.Private.CoreLib.Native.a"
 -g3 -s INITIAL_MEMORY=167772160 --js-library
E:\GitHub\corert\tests\src\Simple\HelloWasm\dotnet_support.js --pre-js
E:\GitHub\corert\tests\src\Simple\HelloWasm\Microsoft.JSInterop.js --post-js
E:\GitHub\corert\tests\src\Simple\HelloWasm\HelloWasm.js -g4 --source-map-base
http://localhost/corerthellowasm/
```

I expect to see in the resulting HelloWasm.wasm.map an entry for MathHelpers.cs
but there is none.  

(Dont think the markdown works, but at least it helps to separate)

-- 
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/20200826/ba4621ce/attachment-0001.html>


More information about the llvm-bugs mailing list