This is an archive of the discontinued LLVM Phabricator instance.

[docs] Increase minimum supported GCC version for building LLVM to 4.8
ClosedPublic

Authored by tejohnson on Oct 17 2016, 9:39 AM.

Details

Summary

The RFC proposal sent to increase the minimum required GCC version
to 4.8 received a lot of support. See the following thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105955.html,

This patch implements that by updating the docs. I believe the
references to libstdc++ 4.7 issues can be removed as well, please
let me know if that is not the case or if they should be updated
a different way.

Event Timeline

tejohnson updated this revision to Diff 74864.Oct 17 2016, 9:39 AM
tejohnson retitled this revision from to [docs] Increase minimum supported GCC version for building LLVM to 4.8.
tejohnson updated this object.
tejohnson added a reviewer: rengolin.
tejohnson added a subscriber: llvm-commits.

Should there be a check in CMakeLists.txt that concretely says that their version of GCC is not supported? This might avoid confusion for people that do not read GettingStarted document first, or are upgrading from an older version with gcc 4.7 still installed. Eg.

if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
  status(FATAL_ERROR "This version of LLVM is known to not compile with GCC before version 4.8")
endif ()
rengolin added inline comments.Oct 18 2016, 7:30 AM
docs/CodingStandards.rst
192

This should be 4.8.0

docs/GettingStarted.rst
278

Chop this line, too... :)

297

And this, we specifically don't support 3.0.

rengolin edited edge metadata.Oct 18 2016, 7:34 AM

Should there be a check in CMakeLists.txt that concretely says that their version of GCC is not supported? This might avoid confusion for people that do not read GettingStarted document first, or are upgrading from an older version with gcc 4.7 still installed. Eg.

if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
  status(FATAL_ERROR "This version of LLVM is known to not compile with GCC before version 4.8")
endif ()

Unsupported doesn't mean despised. :)

We could add a warning, though.

jlebar added a subscriber: jlebar.Oct 18 2016, 8:26 AM
status(FATAL_ERROR "This version of LLVM is known to not compile with GCC before version 4.8")

We could add a warning, though.

I am pretty sure you want a fatal error, otherwise people are going to try it, discover that it doesn't work, and complain on our list.

If someone really wants to use gcc 4.7, nothing is stopping them from going into cmake and commenting out this line. :)

I just noticed this is already implemented in cmake/modules/CheckCompilerVersion.cmake, ie. the version increase is missing in this patch.

I just noticed this is already implemented in cmake/modules/CheckCompilerVersion.cmake, ie. the version increase is missing in this patch.

Will bump the min version there and add to this patch.

tejohnson added inline comments.Oct 18 2016, 9:09 AM
docs/CodingStandards.rst
192

Fixed

docs/GettingStarted.rst
278

Done

297

Done

tejohnson updated this revision to Diff 75019.Oct 18 2016, 9:10 AM
tejohnson edited edge metadata.

Address review comments, including update of cmake check

rengolin accepted this revision.Oct 18 2016, 9:40 AM
rengolin edited edge metadata.

If someone really wants to use gcc 4.7, nothing is stopping them from going into cmake and commenting out this line. :)

Good point. :)

LGTM. Thanks!

This revision is now accepted and ready to land.Oct 18 2016, 9:40 AM
This revision was automatically updated to reflect the committed changes.