-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[clang-doc] fix bug introduced by asset test #97540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) ChangesFixes #97507 this patch fixes the bug by copying assets to the correct repository for windows builds Full diff: https://github.com/llvm/llvm-project/pull/97540.diff 1 Files Affected:
diff --git a/clang-tools-extra/clang-doc/tool/CMakeLists.txt b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
index e93a5728d6b6b..3fd41f187a617 100644
--- a/clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -25,7 +25,11 @@ set(assets
)
set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
-set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
+if(MSVC)
+ set(resource_dir "${CMAKE_BINARY_DIR}/$<CONFIG>/share/clang-doc")
+else()
+ set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
+endif()
set(out_files)
function(copy_files_to_dst src_dir dst_dir file)
@@ -52,4 +56,4 @@ add_custom_target(copy-clang-doc-assets
COMMENT "Copying Clang-Doc Assets"
)
set_target_properties(copy-clang-doc-assets PROPERTIES FOLDER "Clang-Doc/Assets")
-add_dependencies(clang-doc copy-clang-doc-assets)
+add_dependencies(clang-doc copy-clang-doc-assets)
\ No newline at end of file
|
seems to fail on windows CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe (and the pre-merge testing seems to validate my belief) that this breaks the case where you build with ninja + Visual Studio. Also, I believe the Xcode generator is similar to the Visual Studio generator in that they both are multi-config generators, so that configuration is likely failing as well.
I don't have access to a mac could you run build for checking clang-doc in xcode to see if it reports any errors? |
while I have access to a mac, I don't have the ability to use XCode due to company policy. |
We already have set of CMake variables that we use to refer to llvm-project/llvm/CMakeLists.txt Lines 446 to 467 in c02e8f7
I think we should introduce another one for the |
I've introduced a variable in the root cmakelists.txt I'm not very familiar with cmake though I'm sure if this is the correct approach |
@dyung I do not have access to mac for xcode could you provide me with a log of the build failure on xcode |
This was run using the current HEAD, 4c63672. |
I've added the install path using a platform agnostic variable LLVM_SHARE_OUTPUT_INTDIR which should fix build path problems |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/708 Here is the relevant piece of the build log for the reference:
|
This change broke standalone clang builds against installed LLVM, since
Why are you even declaring the directory inside LLVM when it's only used by Clang? Please revert. |
reverts #97540 which broke clangs standalone build
Thank you. |
Fixes #97507
this patch fixes the bug by copying assets to the correct repository for windows builds. It introduces a new global variable
LLVM_SHARE_OUTPUT_INTDIR which points a platform agnostic shared directory