-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Folly doesn't compile with Clang 8 and libc++ #1081
Comments
Summary: - Clang 8 introduces a new compiler option which is turned on by default: `-Wdefaulted-function-deleted`. - This flags some code which has special member functions which we declare as defaulted, but are implicitly deleted. As such, it is a bit misleading to mark them as defaulted. So, mark them as deleted. We could also remove them and they would be implicitly deleted, but then the internal linter would not like that we define a user defined type but are not explicit about deleting or defaulting all special member functions. Note: - This fixes some Clang 8 compilation issues, but facebook#1081 contains details about the remaining issues.
Summary: - Clang 8 introduces a new compiler option which is turned on by default: `-Wdefaulted-function-deleted`. - This flags some code which has special member functions which we declare as defaulted, but are implicitly deleted. As such, it is a bit misleading to mark them as defaulted. So, mark them as deleted. We could also remove them and they would be implicitly deleted, but then the internal linter would not like that we define a user defined type but are not explicit about deleting or defaulting all special member functions. Note: - This fixes some Clang 8 compilation issues, but #1081 contains details about the remaining issues. Pull Request resolved: #1082 Reviewed By: Orvid Differential Revision: D14613574 Pulled By: yfeldblum fbshipit-source-id: 8011b3bc456bf92bbaf374c045fffb130e26d38b
@yfeldblum @Orvid has anyone looked at the remaining Clang 8 compilation issues? It's not obvious to me what the issue(s) are. |
I haven't seen these internally. Are these build failures related to using libc++ (clang's c++ std lib) instead of libstdc++ (gcc's c++ std lib)? |
I have only tried with clang 8 and libc++. Since internally I believe you're using clang 8 with libstdc++, it's likely a libcpp issue. Are you able to reproduce it internally when using libc++? |
I haven't tried with libc++. Betting this is related: https://godbolt.org/z/_8vhHg. Possibly libc++'s |
I think you're definitely on the right track with the handling of the
|
I would expect this to be fixed with llvm-mirror/libcxx@a32a775#diff-48f5ee43879b5ad38888f0a6ead10113 Your example doesn't quite work, but the ones below should: I'll check if the Folly code builds fine tomorrow with Clang trunk and |
Folly builds fine when I use In my opinion, it is probably not worth designing a workaround which would only be for Clang 8 and In any regard, closing this issue. |
Summary: Pull Request resolved: facebookincubator/zstrong#1081 Reviewed By: bigfootjon Differential Revision: D66702321 fbshipit-source-id: 6b16249fb48357a452d82067fb6a468b5d10bc13
[449/617] Building CXX object CMakeFiles/partial_test.dir/folly/functional/test/PartialTest.cpp.o |
With Clang 8 and
libc++
, so far, I have seen at least a few tests (ForeachTest.cpp
line 277 andSynchronizedTest.cpp
).Stack trace for
ForeachTest.cpp
:SynchronizedTest.cpp stack trace:
I have a small patch for
folly/test/SingletonTestStructs.h
which fails due toThe text was updated successfully, but these errors were encountered: