<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - LLVM_CXXFLAGS is used without escaping quotes"
   href="https://llvm.org/bugs/show_bug.cgi?id=25904">25904</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM_CXXFLAGS is used without escaping quotes
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </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>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jeremyhu@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have updated our build system to add -DSVN_REVISION='"<revision>"' to
CXXFLAGS at configure-time when building clang in order to work around <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - clang --version does not report revision like it does when built with automake"
   href="show_bug.cgi?id=25681">bug
#25681</a>.

Unfortunately, does not work because it is added to the LLVM_CXXFLAGS macro
without escaping the quotes:

trunk/tools/llvm-config/llvm-config.cpp:441:45: error: expected ';' after
expression
        OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n';
                                            ^
build/tools/llvm-config/BuildVariables.inc:24:51: note: expanded from macro
'LLVM_CXXFLAGS'
#define LLVM_CXXFLAGS "-pipe -Os -DSVN_REVISION='"256125"' -std=c++11
-stdlib=libc++ -arch x86_64  -fPIC -fvisibility-inlines-hidden -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
-pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -std=c++11 -g  -fno-exceptions
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
                                                  ^
Whatever sets LLVM_CXXFLAGS in BuildVariables.inc should be sure to escape it
appropriately.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>