-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable compiler subprojects on Windows. #95
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
if(WIN32) | ||
set(LLVM_LINK_LLVM_DYLIB OFF) | ||
else() | ||
set(LLVM_LINK_LLVM_DYLIB ON) | ||
endif() | ||
|
||
# The comgr tests have a circular dependency on the HIP runtime. | ||
# https://github.com/nod-ai/TheRock/issues/67 | ||
set(BUILD_TESTING OFF CACHE BOOL "DISABLE BUILDING TESTS IN SUBPROJECTS" FORCE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
patches/amd-mainline/llvm-project/0001-Enable-MSVC-support-in-comgr.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 20b027cca8ce5d1cc816d2ecbf2150ce811cc3f0 Mon Sep 17 00:00:00 2001 | ||
From: Scott <scott.todd0@gmail.com> | ||
Date: Fri, 14 Feb 2025 15:22:48 -0800 | ||
Subject: [PATCH] Enable MSVC support in comgr. | ||
|
||
--- | ||
amd/comgr/CMakeLists.txt | 7 ++++++- | ||
1 file changed, 6 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/amd/comgr/CMakeLists.txt b/amd/comgr/CMakeLists.txt | ||
index ed01d21cea30..e643256f2a89 100644 | ||
--- a/amd/comgr/CMakeLists.txt | ||
+++ b/amd/comgr/CMakeLists.txt | ||
@@ -228,7 +228,12 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") | ||
"/wd4624" #[[Suppress 'derived class' : destructor could not be generated because a base class destructor is inaccessible]] | ||
"/wd4267" #[[Suppress 'var' : conversion from 'size_t' to 'type', possible loss of data]] | ||
"/wd4291" #[[Suppress 'declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception]] | ||
- "/wd4146" #[[Suppress 'unary minus operator applied to unsigned type, result still unsigned]]) | ||
+ "/wd4146" #[[Suppress 'unary minus operator applied to unsigned type, result still unsigned]] | ||
+ | ||
+ # Enable standards-conforming preprocessor. | ||
+ # https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor | ||
+ "/Zc:preprocessor" | ||
+ ) | ||
list(APPEND AMD_COMGR_PRIVATE_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0) | ||
endif() | ||
|
||
-- | ||
2.45.1.windows.1 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Clues that helped settle on this fix:
Should upstream the patch somehow.
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.
Yeah, ping the LLVM team next week. Thanks for the sleuthing.