-
Notifications
You must be signed in to change notification settings - Fork 167
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
compilers: install GCC 8 /CLANG 7 (as V8 does) #1543
Comments
/cc @hashseed who told me that V8 is currently blocked by us because we still support GCC 4.9. They would like to start using C++14 features for which support was added in GCC 5 |
Is this for 11? Otherwise what is the impact for native add-on building if introduced in 10 |
This will probably be for 12. |
Whether it's Node 11 or Node 12 is not particularly relevant for V8, since we take a snapshot of the master branch from time to time to use for our CI. |
@gdams FYI, need to figure out plan for newer compiler on IBM platforms. |
I think we should probably start making moves in this direction for For instance, Debian Stable (stretch) doesn't come with gcc-8, it's queued in Testing & Unstable. Thankfully Ubuntu 18.04 has it though. |
I'm more concerned with the IBM machines. It might be worth considering switching to clang for those, as it seems LLVM is easier to bootstrap. |
clang might be easier in lots of places, https://apt.llvm.org/ is pretty helpful. We'd need to balance that against needing to have gcc compilability tested though unless we're prepared to say gcc isn't a Tier 1 supported compiler. |
We can just barely still say that since it's not for V8... |
We still have a bot that tests building with GCC. We would love to get rid of it though :) |
I don't think we'd want to change just the IBM machines to clang. I'd like them to be building in a similar manner to the other Linux machines where possible. |
We could decide to use clang on every platform where GCC8 is not available. IIUC Google has already built clang for many of those platforms, maybe we could use it's binaries. BTW I'm also working on enabling clang on Windows (at least for testing, and to make V8's life easier). |
Platform breakdown:
|
Addition to @refack's platform breakdown:
|
Based on the discussion here: nodejs/node#25082 we would only need GCC 5.x or higher. |
I'm thinking we should target gcc 6.x for 12.x if we upgrade. If it support C++ 14.x from nodejs/node#25082 its sounds like that is all that we would need. |
Based on the discussion in the last meeting of the BuildWG consensus is that we'll target GCC-6 as the minimum, but strive to use latest (easily) available version for the release of 12. @mhdawson is my understanding correct? |
@refack as you mention the agreement was to target GCC-6 as the minimum and but use later versions were possible on the release machines. That does mean though that we must have testing for GCC-6 for all platforms to validate we are properly supporting the minimum in addition to testing for what we use on the release machines. |
Let me see if I understand... So for example: (BTW we could run the 6 test only daily as it's covered by the limited platforms) |
Ubuntu 14 (trusty) should have 4.9 (for LTS) 6 (for minimum) and 8 on platforms where we use it to release. This might be zero for Ubuntu 14 as we use centos to release on x86 and as per other discussions we may not use gcc 8 for PPC releases I don't think we properly cover 6 by running it only nightly. From our discussion what I understood is that for x64 we would be able to test on both 6 and 8 in regression runs as we already run tests on 2 levels of the compiler. |
@rvagg do you remember why we made "partially static build" only an opt in option (i.e. nodejs/node#4152)? Beside the ~10% size increase of the binary, it seems like that will solve most of our OS/Compiler interoperability woes. Refs: https://stackoverflow.com/questions/13636513/linking-libstdc-statically-any-gotchas |
@refack no, but it may be about historical drift toward more and more libstdc++ usage. There was a time when this wasn't a problem but V8 lead us in to stdc++ usage and we followed. So it could simply be a matter of managing around compatibility without stepping aside and making a strategic decision for it. Making it opt-out might be a good thing to propose. |
Triggered by an observation made by @rvagg I've tracked down some insight into a way for us to verify backwards compatibility of our binaries. For binary:
For target OS:
Refs: https://stackoverflow.com/questions/4133674/glibcxx-versions |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is remove or a comment is made. |
We have another issue to agree on the baseline tools for 14.x so I think this can be closed, let me know if don't think that was the right thing to do. |
Chromium and V8 are actually build with a very recent revision off the LLVM dev branch (svn revision 344066 which is ver 8 that is in progress)
GCC 8.1 has been available since May 2018 (http://gnu.mirrors.pair.com/gcc/gcc-8.1.0/) with 8.2 the latest.
CLang 7 has been available since Sep 2018 (http://releases.llvm.org/).
We are already using a very advanced MSVC compiler.
Using the latest compiler includes the latest optimizers, which is free performance gain. It also enables new C++ language fatures which can make the code simpler, and safer.
As I see it we need to make sure we can do this, then recommend an update to core.
/CC @nodejs/build @nodejs/release
The text was updated successfully, but these errors were encountered: