Otherwise, depending on the lit location used to run the test, llvm-mc adds an include_directories entry in the dwarf output, which breaks tests in some setup.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Otherwise, depending on the lit location used to run the test, llvm-mc adds an include_directories entry in the dwarf output, which breaks tests in some setup.
Do you know under what exact condition this happens? We need it for a better test comment...
Comment Actions
yes, I can provide the full setup, basically:
- run the testsuite to have all the.script file generated: lit -sv ${llvmproject_srcdir}/_build/test/MC/MachO --filter gen-dwarf.s
- go to test directory, for hacking: cd ${llvmproject_dir}/llvm/test/MC/MachO
- run the .script file by hand from that directory: sh ${llvmproject_srcdir}/_build/test/MC/MachO/Output/gen-dwarf.s.script
Comment Actions
Thanks for sharing the setup! If the directory name of gen-dwarf.s is the same as the current working directory (DW_AT_comp_dir), dir_index is 0, otherwise dir_index is 1. MCDwarf.cpp's behavior is consistent with GNU as -g here.