-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Add ENV.cxx14 and option :cxx14 #3153
Conversation
We may want to do something like this
and the converse. But it won't help unless args are being refurbished. |
Which versions of Clang support this? I looked and couldn't see it scoped for them. I wonder if there's a way to make this implicit/automatic instead; the CXX11 approach has been a bit messy. |
Well, in order for this to happen automatically, one would need to analyze the code and look for features from C++11, C++14 etc, which seems undesirable to me. clang supports C++14 fully since 3.4 |
I guess my question would be: what if this flag was passed unconditionally on supported compilers? |
I am not entirely sure there is guaranteed ABI compatibility between libraries compiled with c++11 and pre-c++11 standards. I am seeing posts on stackoverflow.com where people strongly recommend that all libraries within a project should be compiled with the same standard to avoid trouble. But this will be troublesome when dealing with third party closed-source libraries. I wonder why was Your suggestion also implies that every package containing C++ code needs to get recompiled and rebottled. This would keep Jenkins busy for a really long time... @fxcoudert Would you mind chiming in here? I am confident your opinion is more valuable than mine 😄 |
We'd almost certainly need an opt-out in that case since not all formulae are actually able to use ENV.cxx11 for setting c++11 (I'm looking at you boost), and the same will be true for c++14. |
And |
For GCC, there is ABI compatibility between pre-C++11, C++11 and C++14 modes. Any ABI incompatibility — there were some in the past — reported will be treated as a bug and fixed. Regarding clang, I cannot find any statement that this is true nor untrue. However, nothing in the C++11 or C++14 standard actually requires any ABI change, and I guess they would shoot themselves in the foot if they had done so: people frequently compile libraries with different levels of C++ coding. But we could ask for explicit clarification of their position on the matter. |
ABI compatibility will likely be much less an issue than behind the scenes magic that causes build failures. |
One approach would be to not have a DSL for ENV.cxx14, and do Are we going to have a |
To clarify here on what I actually meant (apologies for 👶 ⛔️ 💤): let's not ever have a CXX14 option but instead enable it automatically when needed. |
That will cause build failures without an opt out. |
By the way, the need for a C++14 flag is gone for now as an update for glibmm was released yesterday, removing the C++14 specific code. |
@ilovezfs I agree. Basically I'm 👍 to |
Yeah given #2482 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Needed for the new glibmm update, which makes every dependent formula c++14 as well...