<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56347>56347</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            How to add CFLAGS and CXXFLAGS and LDFLAGS to file.cmake?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ZahraHeydari95
      </td>
    </tr>
</table>

<pre>
    I want to add some flags to the c and c++ compiler in the following file. How should I do this so as not to encounter an error?

FLAGS = -O3 -g -fno-reorder-blocks-and-partition -Wl,--emit-relocs

Please also mention the flags that need to be removed for these flags to work.

[file cmake in github](https://github.com/facebook/hhvm/blob/HHVM-3.30/CMake/HPHPCompiler.cmake)

please guide me.

thanks.

this file is HPHPCompiler.cmake from HHVM project.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9UtuOmzAQ_RrzMgIRCAl54CGbKM1Ku2qkSu2qb8YewI2xI9sk2r_vAFlt2kqVLObKmTOX2sr36hlu3AQIFriU4G2P0Gje-tETOgQB3EgQLHuiB8L2F6XRgTJTtLFa25syLTTkTuBob-A7O2gJzyBHBOUJFLgHY6cqaIQdTCAIbgCds47lB5buWbqdv4eX7ZdvwPI9xF9ziFuIG2Njh9ZJdHGtrTj7mDjFF-6CCsoaiH9olu3iGHsVKJNS_CPiSSP3CFwTkR7N9MtEfu6z4wEMohzZ1QgOe3slq7FuzPIP87hZd04ekVnxNPYNoudnHGfSqtANNSv2LCu7EC6e5VuWHejNkYQGSEbDBdbWnkntuuvoob5qEsfj99c4T_KU9N0rgY6-0_G0u889mSqxbPPI4jL31w5KIjX4B0Pqzpz9Xy7ayUSb5L_g0Djbw0gELs7-QhGSSFa53OQbHtHANVbjlu8Hs5vXNd7I7u3t03jZzzqlTZcx884P0eB09Z_JaH39EPG9PJnK-wE9KcUqX66jrhJlui75WkrBhSzSRbkQJRfrRYGSWKGINK9R-4oWRMuIVJWlWZau0yxdpatimRQyX6SizHKOlJ4VbJliz5VOxsKJdW3kqolDPbSeglr54D-D3HvV0s184PMhdNZVP3nn-BHfJXdqU0QT62qi_Bu2ORl9">