<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94690>94690</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] Record command-line flags in debuginfo by default
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
liushuyu
</td>
</tr>
</table>
<pre>
Hi there,
I wonder if it is possible for the clang frontend to record command-line flags in debug info by default like GCC does (enabling `-grecord-gcc-switches` by default)?
This could make the debug information more useful when doing binary analysis, and also help software vendors (and/or Linux distributions) to detect potential mis-optimizations by examining the build flags.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEkrGO4zgMhp9GbogEipw4ceFiLgPfHXDVYV-AsmibO7IUiNJksk-_sLPADLbZRmpE_h-pD0V4CkSdOv2lTq8VljzH1HkuMpdHqWx0j-4fhjxTImWuSr8q_fI8_4V7DI4S8AicgQVuUYStJxhjWktg8BgmGFMMmYKDHCHREJODIS4LBrfzHAhGj5MAB3BkywQcxgj2AY5GLD6D5zeCv69XcJEElLlQQOs5TKAavZueHXfTMOzkznmYSVSjvzRQplV1_5X828wCQyzewYJvtKF-ZqcFM8cAS0wERWgsHu4zBXBxDbUcMD0AA_qHsChzBQwO0EuEmfwNJI75jongnYKLaUPG4JTpY4L_OJQPcCw5sS1rjijTrptxlGnIcIuZQmb0sLDs4i3zwj82IFlnog9cOKwcK7Qt7N1zf_vnaJXratfWLVbUHc6H8_lwONdtNXd0OZmxNo1D2-KpbXWD9WCwqd3QHvX5UHFntDnqRjfG6Mup3euGLOL5cqG2Plu8qKOmBdnvvX9f9jFNFYsU6tpj0-rKoyUvm0fGbP-ujFmVSt36fmfLJOqoPUuWzw6Zs9_ke1acXuH_Pwrymx9VSb6bc76Jql-U6ZXpJ85zsfshLsr0a9ava3dL8TsNWZl-Qxdl-if9e2d-BgAA__8LcwVb">