[PATCH] D26579: [cmake] Allow CMAKE_BUILD_TYPE=Gentoo

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 12 13:21:49 PST 2016


mehdi_amini added a comment.

There is a good reason Gento is doing it: to make sure they have full control over compiler flags in the Gentoo configuration.  See here: https://github.com/coreos/portage-stable/blob/master/eclass/cmake-utils.eclass#L43

However accepting the value "Gentoo" here won't address the problem, it'll just mask it. We are expecting values from this list in multiple place.

For example in llvm/cmake/modules/HandleLLVMOptions.cmake:

  # On non-Debug builds cmake automatically defines NDEBUG, so we
  # explicitly undefine it:
  if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )

And

  if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND
      NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
    add_flag_if_supported("-gline-tables-only" GLINE_TABLES_ONLY)
  endif()




https://reviews.llvm.org/D26579





More information about the llvm-commits mailing list