[Webkit-unassigned] [Bug 126325] New: Use libc++ for C++11 on darwin

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 30 21:17:31 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=126325

           Summary: Use libc++ for C++11 on darwin
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jeremyhu at apple.com


webkit-gtk tries to use libstdc++ for C++11 even though OS X's libstdc++ doesn't support C++11.

What is the point of this?  The comment makes it look intentional.

# Use the C++11 standard. Do not warn about C++11 incompatibilities.
CXXFLAGS="$CXXFLAGS -pthread -std=c++11 -Wno-c++11-compat"

...

# libstdc++ is at the moment the only option as the C++ standard library when compiling with Clang.
# -Wno-c++11-extensions, currently only usable with Clang, suppresses warnings of C++11 extensions in use.
# Suppress unused arguments warnings for C++ files as well.
if test "$cxx_compiler" = "clang++"; then
   CXXFLAGS="$CXXFLAGS -stdlib=libstdc++ -Wno-c++11-extensions -Qunused-arguments"
fi

---

/usr/bin/clang++ -DHAVE_CONFIG_H -I. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DBUILDING_CAIRO__ -DBUILDING_GTK__ -I./Source -I./Source/WTF -I./Source/WTF/wtf -DGTEST_USE_OWN_TR1_TUPLE=1 -fno-rtti -fstrict-aliasing -O3 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -pipe -Os -Wno-c++11-extensions -arch x86_64 -pthread -std=c++11 -Wno-c++11-compat -stdlib=libstdc++ -Wno-c++11-extensions -Qunused-arguments -O2 -MT Source/WTF/wtf/libWTF_la-Compression.lo -MD -MP -MF Source/WTF/wtf/.deps/libWTF_la-Compression.Tpo -c Source/WTF/wtf/Compression.cpp  -fno-common -DPIC -o Source/WTF/wtf/.libs/libWTF_la-Compression.o
In file included from Source/WTF/wtf/Compression.cpp:28:
In file included from ./Source/WTF/wtf/Compression.h:30:
In file included from ./Source/WTF/wtf/Vector.h:31:
In file included from ./Source/WTF/wtf/VectorTraits.h:26:
./Source/WTF/wtf/RefPtr.h:149:27: error: no member named 'move' in namespace 'std'
       RefPtr ptr = std::move(o);
                    ~~~~~^
./Source/WTF/wtf/RefPtr.h:156:27: error: no member named 'move' in namespace 'std'
       RefPtr ptr = std::move(o);
                    ~~~~~^
2 errors generated.

$ sudo /usr/bin/clang++ -DHAVE_CONFIG_H -I. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DBUILDING_CAIRO__ -DBUILDING_GTK__ -I./Source -I./Source/WTF -I./Source/WTF/wtf -DGTEST_USE_OWN_TR1_TUPLE=1 -fno-rtti -fstrict-aliasing -O3 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -pipe -Os -Wno-c++11-extensions -arch x86_64 -pthread -std=c++11 -Wno-c++11-compat -stdlib=libc++ -Wno-c++11-extensions -Qunused-arguments -O2 -MT Source/WTF/wtf/libWTF_la-Compression.lo -MD -MP -MF Source/WTF/wtf/.deps/libWTF_la-Compression.Tpo -c Source/WTF/wtf/Compression.cpp  -fno-common -DPIC -o Source/WTF/wtf/.libs/libWTF_la-Compression.o

---

We're using libc++ for webkit-gtk-2.2.x in MacPorts without any issues reported.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list