Title: [142394] trunk/Tools
Revision
142394
Author
[email protected]
Date
2013-02-10 02:44:48 -0800 (Sun, 10 Feb 2013)

Log Message

gtkdoc-scangobj throwing warnings when using Clang, causes generate-gtkdoc to fail
https://bugs.webkit.org/show_bug.cgi?id=109315

Patch by Zan Dobersek <[email protected]> on 2013-02-10
Reviewed by Philippe Normand.

* GNUmakefile.am: Define the CC environment variable to the CC compiler that the whole
project was configured to use. This ensures both the regular build and the gtkdoc-scangobj
program use the same compiler.
* gtk/generate-gtkdoc: Add '-Qunused-arguments' to the CFLAGS in case we're using Clang. This
forces Clang to suppress unused arguments warnings that can unnecessarily cause generate-gtkdoc
script to fail.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (142393 => 142394)


--- trunk/Tools/ChangeLog	2013-02-10 10:42:48 UTC (rev 142393)
+++ trunk/Tools/ChangeLog	2013-02-10 10:44:48 UTC (rev 142394)
@@ -1,3 +1,17 @@
+2013-02-10  Zan Dobersek  <[email protected]>
+
+        gtkdoc-scangobj throwing warnings when using Clang, causes generate-gtkdoc to fail
+        https://bugs.webkit.org/show_bug.cgi?id=109315
+
+        Reviewed by Philippe Normand.
+
+        * GNUmakefile.am: Define the CC environment variable to the CC compiler that the whole
+        project was configured to use. This ensures both the regular build and the gtkdoc-scangobj
+        program use the same compiler.
+        * gtk/generate-gtkdoc: Add '-Qunused-arguments' to the CFLAGS in case we're using Clang. This
+        forces Clang to suppress unused arguments warnings that can unnecessarily cause generate-gtkdoc
+        script to fail.
+
 2013-02-09  David Farler  <[email protected]>
 
         Make TestWebKitAPI work for iOS

Modified: trunk/Tools/GNUmakefile.am (142393 => 142394)


--- trunk/Tools/GNUmakefile.am	2013-02-10 10:42:48 UTC (rev 142393)
+++ trunk/Tools/GNUmakefile.am	2013-02-10 10:44:48 UTC (rev 142394)
@@ -321,7 +321,7 @@
 	libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@[email protected] \
 	Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
 	Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
-	$(srcdir)/Tools/gtk/generate-gtkdoc
+	CC=$(CC) $(srcdir)/Tools/gtk/generate-gtkdoc
 	@touch docs-build.stamp
 else
 docs-build.stamp: \
@@ -329,7 +329,7 @@
 	Source/WebKit/gtk/docs/webkitenvironment.xml \
 	Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
 	Source/WebKit/gtk/docs/webkitgtk-sections.txt
-	$(srcdir)/Tools/gtk/generate-gtkdoc
+	CC=$(CC) $(srcdir)/Tools/gtk/generate-gtkdoc
 	@touch docs-build.stamp
 endif
 

Modified: trunk/Tools/gtk/generate-gtkdoc (142393 => 142394)


--- trunk/Tools/gtk/generate-gtkdoc	2013-02-10 10:42:48 UTC (rev 142393)
+++ trunk/Tools/gtk/generate-gtkdoc	2013-02-10 10:44:48 UTC (rev 142394)
@@ -172,6 +172,10 @@
 cflags += ' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32'
 os.environ['CFLAGS'] = cflags
 
+# Clang can be noisy, throwing unnecessary warnings for unused arguments.
+if os.environ.get('CC') == "clang":
+    os.environ['CFLAGS'] += ' -Qunused-arguments'
+
 saw_webkit1_warnings = saw_webkit2_warnings = False
 
 pkg_config_path = common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc')
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to