Skip to content

Cannot compile with gcc < 8.1 #57057

@aaronkintel

Description

@aaronkintel

The release notes indicate that gcc >= 7.1 is sufficient to compile LLVM, but I get the following error when I try with 7.2.0:

<pre>llvm-project/llvm/include/llvm/ADT/StringRef.h:85:65: error: call to non-constexpr function 'static std::size_t std::char_traits<char>::length(const char_type*)'
         : Data(Str), Length(Str ? std::char_traits<char>::length(Str) : 0) {}
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Constexpr char_traits<>::length was not implemented until gcc 8.1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions