-
Notifications
You must be signed in to change notification settings - Fork 5
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
Upgrade LLVM toolchain to version 13 #1152
Conversation
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 am already using clang 13 for my local build. I am glad we can all upgrade to the newer version.
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.
Nice stuff! Some minor comments.
@@ -1,6 +1,4 @@ | |||
[apt] | |||
clang-format-10 |
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.
Why removing without updating?
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.
Note this file is going away (probably today) in another PR.
@@ -7,6 +7,6 @@ | |||
|
|||
gaiac -g hello.ddl -d hello -o . | |||
|
|||
gaiat hello.ruleset -output hello_ruleset.cpp -- -I /usr/lib/clang/10/include -I /opt/gaia/include | |||
gaiat hello.ruleset -output hello_ruleset.cpp -- -I /usr/include/clang/10 -I /opt/gaia/include |
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.
@vDonGlover don't you have some doc that refer the same stuff?
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.
Note that this command line still references clang-10, I just tweaked the intrinsics include dir a bit because I thought this path was friendlier.
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.
@simone-gaia In the hello tutorial we have
gaiat hello.ruleset -output hello_ruleset.cpp -- -I /usr/lib/clang/10/include/ -I /opt/gaia/include/ -I hello
Will it still work or does it need to be updated (and when)?
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.
It doesn't strictly need to be updated, I just thought it was a bit less surprising to have an include path under /usr/include
rather than /usr/lib
...
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.
Customers can still use clang-10; this is only our internal builds, correct? Note also that this doesn't affect gaiat; it's building its own fork of llvm/clang and this is still clang-8, I believe. So, this change should have no affect on customers. @senderista if I'm wrong about this, please let me know.
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.
That's right; this should have no customer impact at all.
@@ -1,6 +1,4 @@ | |||
[apt] | |||
clang-format-10 | |||
clang-tidy-10 | |||
{enable_if('GaiaRelease')}debhelper |
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.
Same as above
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.
These were moved into third_party/production/cmake/gdev.cfg
for consistency with the rest of the LLVM toolchain, and (unfortunately) out of the [apt]
section and into the [run]
section (because LLVM-13 packages aren't in the default Ubuntu 20.04 repositories).
Another thing I plan to do in a later PR: there's no reason we shouldn't be able to use libstdc++ in Debug builds, or libc++ in Release builds. I will introduce a new top-level option, say GAIA_STDLIB, which will default to libc++ in Debug builds and libstdc++ in Release builds, and directly condition on that when choosing a stdlib, rather than conditioning on build type. That way you can just override that option when you want a non-default build type/stdlib configuration. Edit: created https://gaiaplatform.atlassian.net/browse/GAIAPLAT-1830 to track this. |
@@ -29,9 +29,11 @@ install(TARGETS gaia DESTINATION ${CMAKE_INSTALL_LIBDIR}) | |||
# a production only (non-gaia release) build. | |||
# | |||
set(SDK_TEST_INCLUDES | |||
${GAIA_INC} | |||
# REVIEW: the first 2 includes shouldn't be necessary because they're exported | |||
# by INTERFACE targets. | |||
${GAIA_PROD_BUILD}/deps/gaia_spdlog/include |
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 had to add these when I was trying to get the SDK_TEST building again. If we can remove them, that would be good but for some reason that wasn't working for me.
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.
When building apps from the SDK, these headers sit under opt/gaia/include/...
and so they get picked up just by setting /opt/gaia/include/
as the include path.
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 briefly tried to get this working, but failed for some reason and I didn't have time to pursue it further, hence the comment.
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.
Overall looks good. Might want to ping @fineg74 just to make sure changes to the gaiat make files look okay to him as well. (They seemed fine to me).
This is motivated in the long term by new features in clang-format, clang-tidy, and the sanitizers that we would like to use, and in the short term by some TSan bugs I'm dealing with that are fixed post-LLVM 10.
This was more painful than necessary because we don't have centralized definitions for the various toolchain variables. Rather than solve this additional problem in the current PR, I created https://gaiaplatform.atlassian.net/browse/GAIAPLAT-1829 to address it.