-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. #131200
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
Changes from all commits
55653ee
195d4df
8eecac5
b49165a
cb04d4a
8db15c7
929c397
8c70651
b24843b
8681f3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,6 +223,13 @@ endif() | |
# This can be used to detect whether we're in the runtimes build. | ||
set(LLVM_RUNTIMES_BUILD ON) | ||
|
||
if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") | ||
# Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't support it | ||
message(WARNING | ||
"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON is not supported on AIX. LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is set to OFF.") | ||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "" FORCE) | ||
endif() | ||
Comment on lines
+226
to
+231
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm really not a big fan of forcing the setting to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, but the mistake in that case is at the level of the CMake invocation. Whoever configured their CMake invocation passed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We consider it as recoverable mis-config. Because the driver and the cmake are consistent regarding where to search and output the library, users shouldn't be surprised as the compile/linking/execution should be all working. The only thing that may surprise users is that if they search for the library and find out it is not in the My first attempt actually followed what APPLE does: check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that if there is no way to make it work, a FATAL_ERROR would be better. I also think it would be nice to remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What we do for Apple is also bad, and we should fix that. In fact we want to make it work on Apple platforms but we haven't gotten to it yet. The reason for my push back is that we don't want to have configuration logic, especially when it's imperative, in the CMake files. We're working really hard to get away from that and that's why I care so strongly about it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could make it work as there is not technically impossibility, but our decision is not to support two runtime paths on AIX. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this argument makes a lot of sense to me as well.
IIUC it sounds like what we are say is that the CMakeLists shouldn’t be making decisions about how the target is configured. Specifying platform configuration defaults is best left to other mechanisms such as caches file (some of which already handle this option for example) That being the case, if the user specifies There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! Thanks everyone for the input! I will post another PR to change it to using |
||
|
||
foreach(entry ${runtimes}) | ||
get_filename_component(projName ${entry} NAME) | ||
|
||
|
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.
nit: not sure if this really needed to change, but it's fine.
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 for the reivew!
The "old" code is confusing as the condition in
else(condition)
is ignored in this case. So remove it to make it easy to read.