<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Handle -g passed as a compile option"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100218">100218</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Handle -g passed as a compile option
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vedran@miletic.net
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clover uses clang::CompilerInvocation::CreateFromArgs() which is roughly
equivalent to clang -cc1 frontend and does not support GCC-like options,
including -g, which is sometimes passed by OpenCL programs. Section 5.6.3 of
OpenCL 1.1 spec [1] says: "This specification defines a standard set of options
that must be supported by an OpenCL compiler when building program executables
online or offline.  These may be extended by a set of vendor-or
platform-specific options."

Since -g is not mentioned in the spec, we can either:
1) Fail with "Clover does not support -g", which is what we do now but could be
made more explicit.
2) Ignore it, that is s/-g//.
3) Figure out how to enable it and then s/-g/-whatever/ before passing it to
clang.

[1] <a href="https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf">https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>