LLVM build broken?

Currently getting this when compiling on macOS Catalina beta 8 (build 19A558d) and Xcode 11 GM (build 11A419c), with latest checkout (using update-checkout --clone):

In file included from /Users/suyashsrijan/Documents/swift-src/llvm/lib/BinaryFormat/Dwarf.cpp:14:
In file included from /Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/BinaryFormat/Dwarf.h:23:
In file included from /Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/ADT/Optional.h:20:
/Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/Support/AlignOf.h:37:3: error: unknown type name 'alignas'
  alignas(Alignment) char buffer[Size];
/Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/Support/AlignOf.h:37:11: error: declaration of 'Alignment' shadows template parameter
  alignas(Alignment) char buffer[Size];
/Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/Support/AlignOf.h:35:22: note: template parameter is declared here
template<std::size_t Alignment, std::size_t Size>
/Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/Support/AlignOf.h:37:21: error: expected ';' at end of declaration list
  alignas(Alignment) char buffer[Size];
/Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/Support/AlignOf.h:140:59: error: expected
      '(' for function-style cast or type construction
                                      T6, T7, T8, T9, T10>),
/Users/suyashsrijan/Documents/swift-src/llvm/include/llvm/Support/AlignOf.h:142:61: error: expected class name
                                     T6, T7, T8, T9, T10>)> {

Building with: build-script -x -r --clean --reconfigure --skip-build-benchmarks

Here are all the errors - all in LLVM: https://pastebin.com/L8Frkwa8

I have installed the latest Xcode 11 command line tools as well. Gonna try building with Ninja now, but I am not sure why Xcode is broken

Yeah, Ninja build is fine, only Xcode is broken. Interesting, anyone else experiencing the same issue?

I suspect that the Xcode build is not passing -std=gnu++14, so the compiler defaults to gnu++98.

Hmm I'll check... it would be strange if it isn't as the last beta worked fine.

How do you actually pass this flag via build-script?

EDIT: Also tried the change here but still the same error: https://github.com/apple/swift/pull/26673

cc @jrose do you know why this could be happening? Is this a known issue with Xcode 11 GM and/or Catalina beta 8? I have tried re-fetching the sources as well (as I thought it might be "corrupted") but no luck. I have also tried passing "-std=gnu++14" by modifying the AddLLVM.cmake file but it also made no difference.

Nvm I managed to fix it by rolling back to Xcode 11 beta... seems like the GM isn't compatible.

Terms of Service

Privacy Policy

Cookie Policy