Skip to content

Commit 2df2105

Browse files
cor3ntinIanWood1
authored andcommitted
[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 46fada9 commit 2df2105

File tree

20 files changed

+11
-86
lines changed

20 files changed

+11
-86
lines changed

bolt/docs/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 9 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 9 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 9 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 3 deletions
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

0 commit comments

Comments
 (0)