================ @@ -182,23 +258,9 @@ Example usage for a project using a compile commands database: {"index.js", "index_json.js"}}; if (Format == "html") { - void *MainAddr = (void *)(intptr_t)GetExecutablePath; - std::string ClangDocPath = GetExecutablePath(argv[0], MainAddr); - llvm::SmallString<128> NativeClangDocPath; - 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::SmallString<128> DefaultStylesheet; - llvm::sys::path::native(AssetsPath, DefaultStylesheet); - llvm::sys::path::append(DefaultStylesheet, - "clang-doc-default-stylesheet.css"); - llvm::SmallString<128> IndexJS; - llvm::sys::path::native(AssetsPath, IndexJS); - llvm::sys::path::append(IndexJS, "index.js"); - CDCtx.UserStylesheets.insert(CDCtx.UserStylesheets.begin(), - std::string(DefaultStylesheet)); - CDCtx.FilesToCopy.emplace_back(IndexJS.str()); + if (auto Err = getHtmlAssetFiles(argv[0], CDCtx)) { ---------------- nico wrote:
After I've read this in some detail, I'm confused by this patch. As far as I can tell, `getAssetFiles()` looks for _all_ `.css` and `.js` files in the passed-in directory and appends them. Line 182 still wants the main js file to be called `index.js`, even if `--asset` is used (…right?), but only `getDefaultAssetFiles()` checks for the existence of that file. The way I would've expected this to work is that `--asset` just overrides the value of `AssetsPath`. Is there more discussion on why this doesn't implemented that way somewhere that I missed? https://github.com/llvm/llvm-project/pull/96358 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits