[llvm-bugs] [Bug 25904] New: LLVM_CXXFLAGS is used without escaping quotes

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 20 17:50:28 PST 2015


            Bug ID: 25904
           Summary: LLVM_CXXFLAGS is used without escaping quotes
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: jeremyhu at apple.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I have updated our build system to add -DSVN_REVISION='"<revision>"' to
CXXFLAGS at configure-time when building clang in order to work around bug

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
        OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n';
build/tools/llvm-config/BuildVariables.inc:24:51: note: expanded from macro
#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
Whatever sets LLVM_CXXFLAGS in BuildVariables.inc should be sure to escape it

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151221/7f73f8b4/attachment.html>

More information about the llvm-bugs mailing list