Title: [161333] trunk
Revision
161333
Author
[email protected]
Date
2014-01-06 00:56:46 -0800 (Mon, 06 Jan 2014)

Log Message

[GTK] Use libc++ for C++11 on darwin
https://bugs.webkit.org/show_bug.cgi?id=126325

Reviewed by Martin Robinson.

* Source/autotools/SetupCompilerFlags.m4: Don't default to libstdc++ when compiling with Clang.
Instead, the compiler should determine itself what standard library to use, except on Darwin,
where libc++ should be enforced. The standard library of user's choosing can still be enforced
through the CXXFLAGS environment variable.

Modified Paths

Diff

Modified: trunk/ChangeLog (161332 => 161333)


--- trunk/ChangeLog	2014-01-06 08:15:52 UTC (rev 161332)
+++ trunk/ChangeLog	2014-01-06 08:56:46 UTC (rev 161333)
@@ -1,3 +1,15 @@
+2014-01-06  Zan Dobersek  <[email protected]>
+
+        [GTK] Use libc++ for C++11 on darwin
+        https://bugs.webkit.org/show_bug.cgi?id=126325
+
+        Reviewed by Martin Robinson.
+
+        * Source/autotools/SetupCompilerFlags.m4: Don't default to libstdc++ when compiling with Clang.
+        Instead, the compiler should determine itself what standard library to use, except on Darwin,
+        where libc++ should be enforced. The standard library of user's choosing can still be enforced
+        through the CXXFLAGS environment variable.
+
 2014-01-05  Martin Robinson  <[email protected]>
 
         [GTK] [CMake] Ensure that the autotools build and the CMake install the same files

Modified: trunk/Source/autotools/SetupCompilerFlags.m4 (161332 => 161333)


--- trunk/Source/autotools/SetupCompilerFlags.m4	2014-01-06 08:15:52 UTC (rev 161332)
+++ trunk/Source/autotools/SetupCompilerFlags.m4	2014-01-06 08:56:46 UTC (rev 161333)
@@ -8,10 +8,14 @@
     CFLAGS="$CFLAGS -Qunused-arguments"
 fi
 
-# libstdc++ is at the moment the only option as the C++ standard library when compiling with Clang.
 # Suppress unused arguments warnings for C++ files as well.
 if test "$cxx_compiler" = "clang++"; then
-    CXXFLAGS="$CXXFLAGS -stdlib=libstdc++ -Qunused-arguments"
+    CXXFLAGS="$CXXFLAGS -Qunused-arguments"
+
+    # Default to libc++ as the standard library on Darwin, if it isn't already enforced through CXXFLAGS.
+    if test "$os_darwin" = "yes"; then
+        AS_CASE([$CXXFLAGS], [*-stdlib=*], [], [CXXFLAGS="$CXXFLAGS -stdlib=libc++"])
+    fi
 fi
 
 if test "$host_cpu" = "sh4"; then
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to