[llvm-bugs] [Bug 49036] New: clang debug info generation for WebAssembly does not work with -fno-integrated-as
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 4 05:55:01 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49036
Bug ID: 49036
Summary: clang debug info generation for WebAssembly does not
work with -fno-integrated-as
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: WebAssembly
Assignee: unassignedbugs at nondot.org
Reporter: nickysn at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 24480
--> https://bugs.llvm.org/attachment.cgi?id=24480&action=edit
Example program that can be use to reproduce this bug
Using LLVM built from the git main branch, commit
ba87f99168c93461b28a4aa2d05e238ff774d57a.
clang --target=wasm32 -v -g -fno-integrated-as debug.c -o debug.wasm
gives the following errors:
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
ba87f99168c93461b28a4aa2d05e238ff774d57a)
Target: wasm32
Thread model: posix
InstalledDir: /home/nickysn/tralala/llvm/llvm-project/build/bin
"/home/nickysn/tralala/llvm/llvm-project/build/bin/clang-13" -cc1 -triple
wasm32 -S -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name debug.c -mrelocation-model static -mframe-pointer=none
-fno-rounding-math -no-integrated-as -mconstructor-aliases -target-cpu generic
-fvisibility hidden -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -v -resource-dir
/home/nickysn/tralala/llvm/llvm-project/build/lib/clang/13.0.0
-internal-isystem
/home/nickysn/tralala/llvm/llvm-project/build/lib/clang/13.0.0/include
-internal-isystem /include -fno-dwarf-directory-asm -fdebug-compilation-dir
/home/nickysn/tralala/fpc-wasm/wasi/ctest/debug -ferror-limit 19
-fgnuc-version=4.2.1 -fcolor-diagnostics -o /tmp/debug-b15aaa.s -x c debug.c
clang -cc1 version 13.0.0 based upon LLVM 13.0.0git default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/home/nickysn/tralala/llvm/llvm-project/build/lib/clang/13.0.0/include
End of search list.
"/home/nickysn/tralala/llvm/llvm-project/build/bin/clang-13" -cc1as -triple
wasm32 -filetype obj -main-file-name debug.c -target-cpu generic
-dwarf-version=4 -mrelocation-model static -mrelax-all --mrelax-relocations -o
/tmp/debug-ae345d.o /tmp/debug-b15aaa.s
/tmp/debug-b15aaa.s:15:14: error: End of block construct with no start:
end_function
end_function
^
/tmp/debug-b15aaa.s:31:14: error: End of block construct with no start:
end_function
end_function
^
/tmp/debug-b15aaa.s:44:11: error: .local directive should follow the start of a
functioni32
.local i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32,
i32
^
/tmp/debug-b15aaa.s:104:14: error: End of block construct with no start:
end_function
end_function
^
/tmp/debug-b15aaa.s:116:11: error: .local directive should follow the start of
a functioni32
.local i32
^
/tmp/debug-b15aaa.s:122:14: error: End of block construct with no start:
end_function
end_function
^
Compilation with "-g", but without "-fno-integrated-as" works.
Compilation without "-g", but with "-fno-integrated-as" also works.
Compilation for other targets (linux x86_64) with both "-g" and
"-fno-integrated-as" also works.
--
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/20210204/7a12ba50/attachment.html>
More information about the llvm-bugs
mailing list