<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56609>56609</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-fdebug-prefix-map isn't respected when compiling assembler
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
rossburton
</td>
</tr>
</table>
<pre>
WIth a minimal test case:
```
touch foo.s
echo 'int main(void) { return 0;}' > foo.c
```
Build just the C normally, and the debug table has absolute paths in:
```
$ clang-14 -o foo foo.c -g
$ eu-readelf -p.debug_line_str foo
String section [31] '.debug_line_str' contains 22 bytes at offset 0x119a:
[ 0] /home/ross/Mess/clangargh
[ 10] foo.c
```
`-fdebug-prefix-map` can be used to hide these build paths:
```
$ clang-14 -o foo foo.c -g -fdebug-prefix-map=$HOME=
$ eu-readelf -p.debug_line_str foo
String section [31] '.debug_line_str' contains 22 bytes at offset 0x119a:
[ 0] /Mess/clangargh
[ 10] foo.c
```
However, adding the assembler file results in a non-mapped path:
```
$ clang-14 -o foo foo.c foo.s -g -fdebug-prefix-map=$HOME=
$ eu-readelf -p.debug_line_str foo
String section [31] '.debug_line_str' contains 38 bytes at offset 0x11dd:
[ 0] foo.c
[ 6] /home/ross/Mess/clangargh
[ 20] foo.s
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNlMtu3CAUhp8Gb448srFnPF54kclF6SLqoosuI7CPbSIGLMC5vH0PTJtU7WSRdhPLEvfD_38ckHZ46b5_CTMIOCqjjkJDQB-gFx5ZdcGKK1ZcsF3x80_NYNd-htHajT91YD9bYLxRJsBRKMP4_tGqgfEWWHMAh2F1BgpWHVhzRfOAVddpfX82_mFVeoCHlWSEGeESjHUkTL8wfgnCDKl3QLlOEITUCLPwIKS3eg0IiwizBxLxjnrGa-i1MFNe1pDbqOOkBfLpbQauuUMxoB4hXzZps3utDN774OL008xvwSkzgcc-KGuAbQ9VybZXkcUfa6Lr3ppAdDxwDvKFMIMIYMfRY4DiuSxb8aoZYiyIXxHjUcCb2R6RCme9p-IOU5GMCDfNfywrT8veZ0yVfEwS88XhqJ7zo1iokw7egERYPRJnC7MaMPL2CDIdS8L7EbavcOHMhhWlQ3379e461j4x_P_FfWuf8BFdSuBhiLJjDgvv8UgJTKYUpbFDv-oQc5duo7EmElrwhPzj2Zzu5-fBXu3PYh-Gd7H_RvNtaPdP14G_RfRnMWZDVw1t1YosqKCx-5sZKE_vWhPiKS3knc7laUZDBo-L0pHI62lmq9PdHMKS7gm_oX9SYV7lhiZTQ-vHXwVtYB8oGjWV9ytGE9vdrmizudvzcqzkvkBZNkWNVdnsmn3ZNti2WNZ9lWkhUfuOPDLODT5BCkF1MpupjhecF03ZllVd1M1mK-VWcrEvyOV-N1asLpAea72JOjbWTZnrkiTy7WlQKx_82yC5U5NBTNtRfLGG2bou8perC9Zkafcuqf8Bjovk4A">