Closed Bug 1254861 Opened 4 years ago Closed 4 years ago
Unsupport building with clang < 3
58 bytes, text/x-review-board-request
We've already agreed on upgrading our requirements for GCC to 4.8. We don't currently have an actual explicit check for the clang version. This is about adding one, and setting the minimum actively supported version to 3.3. Why 3.3? Because that's the lowest version number we're currently actively building with on automation (but bug 1254854 will actually change that), and that's the smallest version that will bring us support for the same C++11 features that GCC 4.8 will allow us to use, per https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code. For reference, Ubuntu 14.04LTS contains clang 3.4. 12.04LTS contains clang 3.0, which is probably too old already.
Actually, 12.04LTS also has 3.4.
Review commit: https://reviewboard.mozilla.org/r/38881/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/38881/
Comment on attachment 8728258 [details] MozReview Request: Bug 1254861 - Unsupport building with clang < 3.3 https://reviewboard.mozilla.org/r/38881/#review35599 I'm not confident this does the right thing for Apple's clang (as opposed to open-source clang, which it clearly does the correct thing for). I have two (older) installations of Xcode on my computer, one of which has a clang "based on LLVM 3.1svn" while the other has a clang "based on LLVM 3.2svn". Both of these ought to be disallowed by your check, yet testing them shows that the second one would pass; it reports itself as 4.0.2, FWIW. This check needs to be more robust for the Xcode case.
Comment on attachment 8728258 [details] MozReview Request: Bug 1254861 - Unsupport building with clang < 3.3 Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38881/diff/1-2/
Comment on attachment 8728258 [details] MozReview Request: Bug 1254861 - Unsupport building with clang < 3.3 https://reviewboard.mozilla.org/r/38881/#review35879 r=me with added commentary. ::: build/autoconf/toolchain.m4:228 (Diff revision 2) > + if test -n "$CLANG_CC"; then > + AC_TRY_COMPILE(, [#if !__has_feature(cxx_alignof) I think it's worth a comment here and below explaining why we're not using the __clang_major__ et al preprocessing macros. Maybe also why cxx_alignof is the "right" thing to test for?
Attachment #8728258 - Flags: review?(nfroyd) → review+
Many resources on the web claim clang 2.9 supports alignof, bug only 3.6 actually responds to __has_feature(cxx_alignof). Unfortunately, 3.2 does respond to __has_feature(cxx_alignas), despite the 3.3 release notes explicitly mentioning alignas as being completed. Anyways, it turns out __has_feature(cxx_inheriting_constructors) *is* false on 3.2 and true on 3.3, so I'll use that.
You need to log in before you can comment on or make changes to this bug.