anza-xyz / move

Move compiler targeting llvm supported backends
https://discord.gg/wFgfjG9J
Apache License 2.0
109 stars 34 forks source link

Add Dwarf test #390

Closed jcivlin closed 11 months ago

jcivlin commented 11 months ago

Added dwarf_tests.rs.

Also added macro macro_rules! to_cstring, since usage of the pointer and len of a local CString in a call was incorrect.

Since .dbg_info contains the absolute paths of source names, the content of .dbg_info becomes host sensitive. Test_common.rs was updated with code that helps to mask out this sensitivity before comparison of .actual vs .expected.

jcivlin commented 11 months ago

@dmakarov are there unresolved or more comments?

jcivlin commented 11 months ago

plz approve if no more comments

jcivlin commented 11 months ago

End-users won't use the move-mv-llvm-compiler. They'll use move build.

How debug info is generated when move build command is used? How is it tested?

The customer may choose either interface: move build for package compilation of move-mv-llvm-compiler for development. I need this test for development of Dwarf collection in compiler and move-mv--llvm-move is more convenient for me.

If we need to compare or test how move build responds to -g it should be another PR.

dmakarov commented 11 months ago

End-users won't use the move-mv-llvm-compiler. They'll use move build. How debug info is generated when move build command is used? How is it tested?

The customer may choose either interface: move build for package compilation of move-mv-llvm-compiler for development. I need this test for development of Dwarf collection in compiler and move-mv--llvm-move is more convenient for me.

No, we're not going to release move-mv-llvm-compiler to end-users. It's more important that we test the final product that customers will use, than what is more convenient for you.

jcivlin commented 11 months ago

End-users won't use the move-mv-llvm-compiler. They'll use move build. How debug info is generated when move build command is used? How is it tested?

The customer may choose either interface: move build for package compilation of move-mv-llvm-compiler for development. I need this test for development of Dwarf collection in compiler and move-mv--llvm-move is more convenient for me.

No, we're not going to release move-mv-llvm-compiler to end-users. It's more important that we test the final product that customers will use, than what is more convenient for you.

I do not know why and when we made this decision. But anyhow this argument is outside of this PR. Plz notice that this PR was already approved by another reviewer.

jcivlin commented 11 months ago

Thx!