-
Notifications
You must be signed in to change notification settings - Fork 55
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
Find CLANG_RESOURCE_DIR using clang -print-resource-dir #70
Conversation
Suggested-By: https://reviews.llvm.org/D49486 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Thanks for adding! Testing this with internal CI, will report back with results |
Submitting on behalf of github user @littlewu2508 #70 Change-Id: I6437677c2cdaecd0ab2d966ce26760f4f75ea09d
Getting this error on Windows:
Apparently "The syntax of the command is incorrect" is a Windows error on invalid file copy/move/rename. So I'm guessing either CLANG_RESOURCE_DIR or OPENCL_C_H are empty? Any ideas? Should we condition this on NOT WIN32? Also wondering if we may want to keep some of the error checking |
else() | ||
get_target_property(clang_build_header_dir clang-resource-headers RUNTIME_OUTPUT_DIRECTORY) | ||
set(OPENCL_C_H "${clang_build_header_dir}/opencl-c.h") | ||
execute_process(COMMAND "${CLANG_CMAKE_DIR}/../../../bin/clang" -print-resource-dir OUTPUT_VARIABLE CLANG_RESOURCE_DIR) |
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.
Apparently "The syntax of the command is incorrect" is a Windows error on invalid file copy/move/rename. So I'm guessing either CLANG_RESOURCE_DIR or OPENCL_C_H are empty?
This line is the key to determine CLANG_RESOURCE_DIR
, and it calls to the clang executable. Maybe on windows this should be clang.exe
rather than clang
? Or on windows "${CLANG_CMAKE_DIR}/../../../bin/clang.exe"
does not exist?
@lamb-j Can you trace the output of this command? Sorry that I'm not familiar with Windows.
I've just submitted for testing a follow up patch that switches clang/clang.exe for windows, and adds error checking. Will report back with results |
llvm#105923) …519)" This reverts commit e00d32a and adds a test for lambda arrow SplitPenalty. Fixes llvm#105480.
Continuation of ROCm/ROCm-CompilerSupport#51