Skip to content

Conversation

@PeterChou1
Copy link
Contributor

Updates the install path for clang-doc to share/clang-doc instead share/clang to avoid confusion

@llvmbot
Copy link
Member

llvmbot commented Jun 24, 2024

@llvm/pr-subscribers-clang-tools-extra

Author: None (PeterChou1)

Changes

Updates the install path for clang-doc to share/clang-doc instead share/clang to avoid confusion


Full diff: https://github.com/llvm/llvm-project/pull/96555.diff

2 Files Affected:

  • (modified) clang-tools-extra/clang-doc/tool/CMakeLists.txt (+2-2)
  • (modified) clang-tools-extra/clang-doc/tool/ClangDocMain.cpp (+1-1)
diff --git a/clang-tools-extra/clang-doc/tool/CMakeLists.txt b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
index 4944251245c6b..e93a5728d6b6b 100644
--- a/clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -25,7 +25,7 @@ set(assets
 )
 
 set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
-set(resource_dir "${CMAKE_BINARY_DIR}/share/clang")
+set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
 set(out_files)
 
 function(copy_files_to_dst src_dir dst_dir file)
@@ -42,7 +42,7 @@ endfunction(copy_files_to_dst)
 
 foreach(f ${assets})
   install(FILES ${asset_dir}/${f}
-    DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
+    DESTINATION "${CMAKE_INSTALL_DATADIR}/clang-doc"
     COMPONENT clang-doc)
   copy_files_to_dst(${asset_dir} ${resource_dir} ${f})
 endforeach(f)
diff --git a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
index 5517522d7967d..1feb6d3b74d70 100644
--- a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+++ b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
@@ -188,7 +188,7 @@ Example usage for a project using a compile commands database:
     llvm::sys::path::native(ClangDocPath, NativeClangDocPath);
     llvm::SmallString<128> AssetsPath;
     AssetsPath = llvm::sys::path::parent_path(NativeClangDocPath);
-    llvm::sys::path::append(AssetsPath, "..", "share", "clang");
+    llvm::sys::path::append(AssetsPath, "..", "share", "clang-doc");
     llvm::SmallString<128> DefaultStylesheet;
     llvm::sys::path::native(AssetsPath, DefaultStylesheet);
     llvm::sys::path::append(DefaultStylesheet,

@ilovepi ilovepi merged commit d7dd778 into llvm:main Jun 25, 2024
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
…lang (llvm#96555)

Updates the install path for clang-doc to share/clang-doc instead
share/clang to avoid confusion
milkice233 pushed a commit to fedora-riscv/llvm that referenced this pull request Jan 22, 2025
In fedora-llvm-team/llvm-snapshots#564 (comment)
we noticed that `clang-doc-default-stylesheet.css` and `index.js` are no
longer installed to `/usr/share/clang` but `/usr/share/clang-doc`
instead. This addresses the [change in upstream](llvm/llvm-project#96555).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants