[GTK][WPE] Gtk-Doc fails with build options which need cooperation between CFLAGS...
authoraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Aug 2019 18:58:13 +0000 (18:58 +0000)
committeraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Aug 2019 18:58:13 +0000 (18:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200987

Reviewed by Philippe Normand.

Only CFLAGS was being set before trying to generate the documentation
but not LDFLAGS, which could cause errors when gtk-doc tries to link
a generated program when the compiler flags would also require usage
of certain linker flags later on.

* Source/cmake/GtkDoc.cmake: Also set LDFLAGS in the environment when
invoking Tools/gtkdoc/generate-gtkdoc.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/GtkDoc.cmake

index e5a335e..484faa1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2019-08-21  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [GTK][WPE] Gtk-Doc fails with build options which need cooperation between CFLAGS and LDFLAGS
+        https://bugs.webkit.org/show_bug.cgi?id=200987
+
+        Reviewed by Philippe Normand.
+
+        Only CFLAGS was being set before trying to generate the documentation
+        but not LDFLAGS, which could cause errors when gtk-doc tries to link
+        a generated program when the compiler flags would also require usage
+        of certain linker flags later on.
+
+        * Source/cmake/GtkDoc.cmake: Also set LDFLAGS in the environment when
+        invoking Tools/gtkdoc/generate-gtkdoc.
+
 2019-08-16  Ross Kirsling  <ross.kirsling@sony.com>
 
         [Win] WebCoreTestSupport is too big to link
index 2ee0555..b0fb31c 100644 (file)
@@ -4,7 +4,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
     add_custom_command(
         OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
         DEPENDS ${DocumentationDependencies}
-        COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args}
+        COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args}
         COMMAND touch ${_stamp_name}
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
         VERBATIM