Skip to content

Commit 320ec7f

Browse files
authored
[Documentation] Always use SVG for dot-generated doxygen images. (llvm#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.
1 parent 5ff2774 commit 320ec7f

File tree

20 files changed

+11
-86
lines changed

20 files changed

+11
-86
lines changed

bolt/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ if (LLVM_ENABLE_DOXYGEN)
4848
set(bolt_doxygen_qhp_cust_filter_attrs "")
4949
endif()
5050

51-
option(LLVM_DOXYGEN_SVG
52-
"Use svg instead of png files for doxygen graphs." OFF)
53-
if (LLVM_DOXYGEN_SVG)
54-
set(DOT_IMAGE_FORMAT "svg")
55-
else()
56-
set(DOT_IMAGE_FORMAT "png")
57-
endif()
58-
5951
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
6052
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6153

@@ -73,7 +65,6 @@ if (LLVM_ENABLE_DOXYGEN)
7365
set(bolt_doxygen_qhelpgenerator_path)
7466
set(bolt_doxygen_qhp_cust_filter_name)
7567
set(bolt_doxygen_qhp_cust_filter_attrs)
76-
set(DOT_IMAGE_FORMAT)
7768

7869
add_custom_target(doxygen-bolt
7970
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

bolt/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ DIRECTORY_GRAPH = YES
22102210
# The default value is: png.
22112211
# This tag requires that the tag HAVE_DOT is set to YES.
22122212

2213-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2213+
DOT_IMAGE_FORMAT = svg
22142214

22152215
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22162216
# enable generation of interactive SVG images that allow zooming and panning.

clang-tools-extra/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ if (DOXYGEN_FOUND)
4646
set(clang_tools_doxygen_qhp_cust_filter_attrs "")
4747
endif()
4848

49-
option(LLVM_DOXYGEN_SVG
50-
"Use svg instead of png files for doxygen graphs." OFF)
51-
if (LLVM_DOXYGEN_SVG)
52-
set(DOT_IMAGE_FORMAT "svg")
53-
else()
54-
set(DOT_IMAGE_FORMAT "png")
55-
endif()
56-
5749
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
5850
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
5951

@@ -71,7 +63,6 @@ if (DOXYGEN_FOUND)
7163
set(clang_tools_doxygen_qhelpgenerator_path)
7264
set(clang_tools_doxygen_qhp_cust_filter_name)
7365
set(clang_tools_doxygen_qhp_cust_filter_attrs)
74-
set(DOT_IMAGE_FORMAT)
7566

7667
add_custom_target(doxygen-clang-tools
7768
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

clang-tools-extra/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ DIRECTORY_GRAPH = YES
22052205
# The default value is: png.
22062206
# This tag requires that the tag HAVE_DOT is set to YES.
22072207

2208-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2208+
DOT_IMAGE_FORMAT = svg
22092209

22102210
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22112211
# enable generation of interactive SVG images that allow zooming and panning.

clang/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ if (LLVM_ENABLE_DOXYGEN)
4747
set(clang_doxygen_qhp_cust_filter_attrs "")
4848
endif()
4949

50-
option(LLVM_DOXYGEN_SVG
51-
"Use svg instead of png files for doxygen graphs." OFF)
52-
if (LLVM_DOXYGEN_SVG)
53-
set(DOT_IMAGE_FORMAT "svg")
54-
else()
55-
set(DOT_IMAGE_FORMAT "png")
56-
endif()
57-
5850
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
5951
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6052

@@ -72,7 +64,6 @@ if (LLVM_ENABLE_DOXYGEN)
7264
set(clang_doxygen_qhelpgenerator_path)
7365
set(clang_doxygen_qhp_cust_filter_name)
7466
set(clang_doxygen_qhp_cust_filter_attrs)
75-
set(DOT_IMAGE_FORMAT)
7667

7768
add_custom_target(doxygen-clang
7869
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

clang/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,7 @@ DIRECTORY_GRAPH = YES
21932193
# The default value is: png.
21942194
# This tag requires that the tag HAVE_DOT is set to YES.
21952195

2196-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2196+
DOT_IMAGE_FORMAT = svg
21972197

21982198
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
21992199
# enable generation of interactive SVG images that allow zooming and panning.

flang/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ if (LLVM_ENABLE_DOXYGEN)
4848
set(flang_doxygen_qhp_cust_filter_attrs "")
4949
endif()
5050

51-
option(LLVM_DOXYGEN_SVG
52-
"Use svg instead of png files for doxygen graphs." OFF)
53-
if (LLVM_DOXYGEN_SVG)
54-
set(DOT_IMAGE_FORMAT "svg")
55-
else()
56-
set(DOT_IMAGE_FORMAT "png")
57-
endif()
58-
5951
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
6052
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6153

@@ -73,7 +65,6 @@ if (LLVM_ENABLE_DOXYGEN)
7365
set(flang_doxygen_qhelpgenerator_path)
7466
set(flang_doxygen_qhp_cust_filter_name)
7567
set(flang_doxygen_qhp_cust_filter_attrs)
76-
set(DOT_IMAGE_FORMAT)
7768

7869
add_custom_target(doxygen-flang
7970
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

flang/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,7 @@ DIRECTORY_GRAPH = YES
22082208
# The default value is: png.
22092209
# This tag requires that the tag HAVE_DOT is set to YES.
22102210

2211-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2211+
DOT_IMAGE_FORMAT = svg
22122212

22132213
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22142214
# enable generation of interactive SVG images that allow zooming and panning.

lldb/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ DIRECTORY_GRAPH = YES
15711571
# generated by dot. Possible values are png, jpg, or gif
15721572
# If left blank png will be used.
15731573

1574-
DOT_IMAGE_FORMAT = png
1574+
DOT_IMAGE_FORMAT = svg
15751575

15761576
# The tag DOT_PATH can be used to specify the path where the dot tool can be
15771577
# found. If left blank, it is assumed the dot tool can be found in the path.

llvm/docs/CMake.rst

-3
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,6 @@ enabled sub-projects. Nearly all of these variable names begin with
469469
combination with ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``; otherwise
470470
it has no effect.
471471

472-
**LLVM_DOXYGEN_SVG**:BOOL
473-
Uses .svg files instead of .png files for graphs in the Doxygen output.
474-
Defaults to OFF.
475472

476473
.. _llvm_enable_assertions:
477474

llvm/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ if (LLVM_ENABLE_DOXYGEN)
5656
set(llvm_doxygen_qhp_cust_filter_attrs "")
5757
endif()
5858

59-
option(LLVM_DOXYGEN_SVG
60-
"Use svg instead of png files for doxygen graphs." OFF)
61-
if (LLVM_DOXYGEN_SVG)
62-
set(DOT_IMAGE_FORMAT "svg")
63-
else()
64-
set(DOT_IMAGE_FORMAT "png")
65-
endif()
66-
6759
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
6860
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6961

@@ -81,7 +73,6 @@ if (LLVM_ENABLE_DOXYGEN)
8173
set(llvm_doxygen_qhelpgenerator_path)
8274
set(llvm_doxygen_qhp_cust_filter_name)
8375
set(llvm_doxygen_qhp_cust_filter_attrs)
84-
set(DOT_IMAGE_FORMAT)
8576

8677
add_custom_target(doxygen-llvm
8778
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

llvm/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ DIRECTORY_GRAPH = YES
21942194
# The default value is: png.
21952195
# This tag requires that the tag HAVE_DOT is set to YES.
21962196

2197-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2197+
DOT_IMAGE_FORMAT = svg
21982198

21992199
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22002200
# enable generation of interactive SVG images that allow zooming and panning.

llvm/utils/release/build-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fi
113113
if [ "$no_doxygen" != "yes" ]; then
114114
echo "Doxygen: enabled"
115115
doxygen_targets="$docs_target doxygen-clang doxygen-clang-tools doxygen-flang doxygen-llvm doxygen-mlir doxygen-polly"
116-
doxygen_flag=" -DLLVM_ENABLE_DOXYGEN=ON -DLLVM_DOXYGEN_SVG=ON"
116+
doxygen_flag=" -DLLVM_ENABLE_DOXYGEN=ON"
117117
else
118118
echo "Doxygen: disabled"
119119
fi

mlir/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ if (LLVM_ENABLE_DOXYGEN)
4747
set(mlir_doxygen_qhp_cust_filter_attrs "")
4848
endif()
4949

50-
option(LLVM_DOXYGEN_SVG
51-
"Use svg instead of png files for doxygen graphs." OFF)
52-
if (LLVM_DOXYGEN_SVG)
53-
set(DOT_IMAGE_FORMAT "svg")
54-
else()
55-
set(DOT_IMAGE_FORMAT "png")
56-
endif()
57-
5850
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
5951
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6052

@@ -72,7 +64,6 @@ if (LLVM_ENABLE_DOXYGEN)
7264
set(mlir_doxygen_qhelpgenerator_path)
7365
set(mlir_doxygen_qhp_cust_filter_name)
7466
set(mlir_doxygen_qhp_cust_filter_attrs)
75-
set(DOT_IMAGE_FORMAT)
7667

7768
add_custom_target(doxygen-mlir
7869
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

mlir/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ DIRECTORY_GRAPH = YES
21942194
# The default value is: png.
21952195
# This tag requires that the tag HAVE_DOT is set to YES.
21962196

2197-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2197+
DOT_IMAGE_FORMAT = svg
21982198

21992199
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22002200
# enable generation of interactive SVG images that allow zooming and panning.

openmp/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ if (LLVM_ENABLE_DOXYGEN)
4747
set(openmp_doxygen_qhp_cust_filter_attrs "")
4848
endif()
4949

50-
option(LLVM_DOXYGEN_SVG
51-
"Use svg instead of png files for doxygen graphs." OFF)
52-
if (LLVM_DOXYGEN_SVG)
53-
set(DOT_IMAGE_FORMAT "svg")
54-
else()
55-
set(DOT_IMAGE_FORMAT "png")
56-
endif()
57-
5850
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
5951
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6052

@@ -72,7 +64,6 @@ if (LLVM_ENABLE_DOXYGEN)
7264
set(openmp_doxygen_qhelpgenerator_path)
7365
set(openmp_doxygen_qhp_cust_filter_name)
7466
set(openmp_doxygen_qhp_cust_filter_attrs)
75-
set(DOT_IMAGE_FORMAT)
7667

7768
add_custom_target(doxygen-openmp
7869
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

openmp/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ DIRECTORY_GRAPH = YES
21942194
# The default value is: png.
21952195
# This tag requires that the tag HAVE_DOT is set to YES.
21962196

2197-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2197+
DOT_IMAGE_FORMAT = svg
21982198

21992199
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22002200
# enable generation of interactive SVG images that allow zooming and panning.

openmp/runtime/doc/doxygen/config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@ DIRECTORY_GRAPH = YES
17461746
# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
17471747
# visible in IE 9+ (other browsers do not have this requirement).
17481748

1749-
DOT_IMAGE_FORMAT = png
1749+
DOT_IMAGE_FORMAT = svg
17501750

17511751
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
17521752
# enable generation of interactive SVG images that allow zooming and panning.

polly/docs/CMakeLists.txt

-9
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ if (LLVM_ENABLE_DOXYGEN)
4646
set(polly_doxygen_qhp_cust_filter_attrs "")
4747
endif()
4848

49-
option(LLVM_DOXYGEN_SVG
50-
"Use svg instead of png files for doxygen graphs." OFF)
51-
if (LLVM_DOXYGEN_SVG)
52-
set(DOT_IMAGE_FORMAT "svg")
53-
else()
54-
set(DOT_IMAGE_FORMAT "png")
55-
endif()
56-
5749
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
5850
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
5951

@@ -71,7 +63,6 @@ if (LLVM_ENABLE_DOXYGEN)
7163
set(polly_doxygen_qhelpgenerator_path)
7264
set(polly_doxygen_qhp_cust_filter_name)
7365
set(polly_doxygen_qhp_cust_filter_attrs)
74-
set(DOT_IMAGE_FORMAT)
7566

7667
add_custom_target(doxygen-polly
7768
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

polly/docs/doxygen.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2206,7 +2206,7 @@ DIRECTORY_GRAPH = YES
22062206
# The default value is: png.
22072207
# This tag requires that the tag HAVE_DOT is set to YES.
22082208

2209-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2209+
DOT_IMAGE_FORMAT = svg
22102210

22112211
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22122212
# enable generation of interactive SVG images that allow zooming and panning.

0 commit comments

Comments
 (0)