[Documentation] Always use SVG for dot-generated doxygen images. (#136843)

Despite our attempt (build-docs.sh)
to build the documentation with SVG,
it still uses PNG https://llvm.org/doxygen/classllvm_1_1StringRef.html,

and that renders terribly on any high dpi display.

SVG leads to smasller installation and works fine
on all browser (that has been true for _a while_
https://caniuse.com/svg), so this patch just unconditionally build all
dot graphs as SVG in all subprojects and remove the option.
This commit is contained in:
cor3ntin 2025-04-25 14:13:17 +02:00 committed by GitHub
parent 5ff277462d
commit 320ec7fa7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 11 additions and 86 deletions

View File

@ -48,14 +48,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(bolt_doxygen_qhp_cust_filter_attrs "") set(bolt_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -73,7 +65,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(bolt_doxygen_qhelpgenerator_path) set(bolt_doxygen_qhelpgenerator_path)
set(bolt_doxygen_qhp_cust_filter_name) set(bolt_doxygen_qhp_cust_filter_name)
set(bolt_doxygen_qhp_cust_filter_attrs) set(bolt_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-bolt add_custom_target(doxygen-bolt
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2210,7 +2210,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -46,14 +46,6 @@ if (DOXYGEN_FOUND)
set(clang_tools_doxygen_qhp_cust_filter_attrs "") set(clang_tools_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -71,7 +63,6 @@ if (DOXYGEN_FOUND)
set(clang_tools_doxygen_qhelpgenerator_path) set(clang_tools_doxygen_qhelpgenerator_path)
set(clang_tools_doxygen_qhp_cust_filter_name) set(clang_tools_doxygen_qhp_cust_filter_name)
set(clang_tools_doxygen_qhp_cust_filter_attrs) set(clang_tools_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-clang-tools add_custom_target(doxygen-clang-tools
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2205,7 +2205,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -47,14 +47,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(clang_doxygen_qhp_cust_filter_attrs "") set(clang_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -72,7 +64,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(clang_doxygen_qhelpgenerator_path) set(clang_doxygen_qhelpgenerator_path)
set(clang_doxygen_qhp_cust_filter_name) set(clang_doxygen_qhp_cust_filter_name)
set(clang_doxygen_qhp_cust_filter_attrs) set(clang_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-clang add_custom_target(doxygen-clang
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2193,7 +2193,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -48,14 +48,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(flang_doxygen_qhp_cust_filter_attrs "") set(flang_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -73,7 +65,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(flang_doxygen_qhelpgenerator_path) set(flang_doxygen_qhelpgenerator_path)
set(flang_doxygen_qhp_cust_filter_name) set(flang_doxygen_qhp_cust_filter_name)
set(flang_doxygen_qhp_cust_filter_attrs) set(flang_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-flang add_custom_target(doxygen-flang
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2208,7 +2208,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -1571,7 +1571,7 @@ DIRECTORY_GRAPH = YES
# generated by dot. Possible values are png, jpg, or gif # generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used. # If left blank png will be used.
DOT_IMAGE_FORMAT = png DOT_IMAGE_FORMAT = svg
# The tag DOT_PATH can be used to specify the path where the dot tool can be # The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path. # found. If left blank, it is assumed the dot tool can be found in the path.

View File

@ -469,9 +469,6 @@ enabled sub-projects. Nearly all of these variable names begin with
combination with ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``; otherwise combination with ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``; otherwise
it has no effect. it has no effect.
**LLVM_DOXYGEN_SVG**:BOOL
Uses .svg files instead of .png files for graphs in the Doxygen output.
Defaults to OFF.
.. _llvm_enable_assertions: .. _llvm_enable_assertions:

View File

@ -56,14 +56,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(llvm_doxygen_qhp_cust_filter_attrs "") set(llvm_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -81,7 +73,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(llvm_doxygen_qhelpgenerator_path) set(llvm_doxygen_qhelpgenerator_path)
set(llvm_doxygen_qhp_cust_filter_name) set(llvm_doxygen_qhp_cust_filter_name)
set(llvm_doxygen_qhp_cust_filter_attrs) set(llvm_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-llvm add_custom_target(doxygen-llvm
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2194,7 +2194,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -113,7 +113,7 @@ fi
if [ "$no_doxygen" != "yes" ]; then if [ "$no_doxygen" != "yes" ]; then
echo "Doxygen: enabled" echo "Doxygen: enabled"
doxygen_targets="$docs_target doxygen-clang doxygen-clang-tools doxygen-flang doxygen-llvm doxygen-mlir doxygen-polly" doxygen_targets="$docs_target doxygen-clang doxygen-clang-tools doxygen-flang doxygen-llvm doxygen-mlir doxygen-polly"
doxygen_flag=" -DLLVM_ENABLE_DOXYGEN=ON -DLLVM_DOXYGEN_SVG=ON" doxygen_flag=" -DLLVM_ENABLE_DOXYGEN=ON"
else else
echo "Doxygen: disabled" echo "Doxygen: disabled"
fi fi

View File

@ -47,14 +47,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(mlir_doxygen_qhp_cust_filter_attrs "") set(mlir_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -72,7 +64,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(mlir_doxygen_qhelpgenerator_path) set(mlir_doxygen_qhelpgenerator_path)
set(mlir_doxygen_qhp_cust_filter_name) set(mlir_doxygen_qhp_cust_filter_name)
set(mlir_doxygen_qhp_cust_filter_attrs) set(mlir_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-mlir add_custom_target(doxygen-mlir
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2194,7 +2194,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -47,14 +47,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(openmp_doxygen_qhp_cust_filter_attrs "") set(openmp_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -72,7 +64,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(openmp_doxygen_qhelpgenerator_path) set(openmp_doxygen_qhelpgenerator_path)
set(openmp_doxygen_qhp_cust_filter_name) set(openmp_doxygen_qhp_cust_filter_name)
set(openmp_doxygen_qhp_cust_filter_attrs) set(openmp_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-openmp add_custom_target(doxygen-openmp
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2194,7 +2194,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -1746,7 +1746,7 @@ DIRECTORY_GRAPH = YES
# HTML_FILE_EXTENSION to xhtml in order to make the SVG files # HTML_FILE_EXTENSION to xhtml in order to make the SVG files
# visible in IE 9+ (other browsers do not have this requirement). # visible in IE 9+ (other browsers do not have this requirement).
DOT_IMAGE_FORMAT = png DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.

View File

@ -46,14 +46,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(polly_doxygen_qhp_cust_filter_attrs "") set(polly_doxygen_qhp_cust_filter_attrs "")
endif() endif()
option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
set(DOT_IMAGE_FORMAT "svg")
else()
set(DOT_IMAGE_FORMAT "png")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
@ -71,7 +63,6 @@ if (LLVM_ENABLE_DOXYGEN)
set(polly_doxygen_qhelpgenerator_path) set(polly_doxygen_qhelpgenerator_path)
set(polly_doxygen_qhp_cust_filter_name) set(polly_doxygen_qhp_cust_filter_name)
set(polly_doxygen_qhp_cust_filter_attrs) set(polly_doxygen_qhp_cust_filter_attrs)
set(DOT_IMAGE_FORMAT)
add_custom_target(doxygen-polly add_custom_target(doxygen-polly
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

View File

@ -2206,7 +2206,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png. # The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@ DOT_IMAGE_FORMAT = svg
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning. # enable generation of interactive SVG images that allow zooming and panning.