-
Notifications
You must be signed in to change notification settings - Fork 98
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
remove clang dep #711
remove clang dep #711
Conversation
2dc2ae3
to
4ebb71b
Compare
@@ -2,17 +2,5 @@ | |||
# Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. | |||
# SPDX-License-Identifier: MIT | |||
|
|||
# specify the compiler | |||
set(CLANG_VER 12) |
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.
Great ! This one was a pain to me about looking for such a compiler in an antique boutique. So I always had to update this file.
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.
lgtm
4ebb71b
to
d2193e4
Compare
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0") | ||
check_cxx_compiler_flag("-Wno-unused-but-set-parameter" CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER) | ||
append_if(CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER "-Wno-unused-but-set-parameter" CMAKE_CXX_FLAGS) | ||
endif() |
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.
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.
Thanks!
This PR removes the dependency on clang-12 for tests and examples. I say tests and examples because there was never a real dependency (I've never built with clang-12...) because as far as I understand the dependency was only on the artifacts passed to chess rather than any compilation aie artifacts themselves.
Note this PR also drops the
DCMAKE_COMPILE_WARNING_AS_ERROR
because gcc will fail to compile MLIR with it on (lol).EDIT:
Just want to be clear: this works across all platforms with all compilers currently and I don't know why this was needed (before my time). The wheels I build for us are built using gcc on Linux, clang on Mac, and MSCV on Windows:
Regarding the
utils/
scripts: there seems to be nothing to be gained from suggesting/implying/guaranteeing clang compatibility1 and not gcc. Yes, there are some clang specific#pragma
s (and gcc too) butcc @nirvedhmeshram
Footnotes
And plenty to be lost (by signaling there's this added friction, of having clang, to using the tool). ↩