Description
Build steps
I tried this code:
./configure --enable-llvm-static-stdcpp --enable-optimize-llvm --enable-clang --set llvm.ninja=false --enable-lld
./x.py build src/llvm-project/ src/llvm-project/lld
LLVM configuration options
running: cd "/rust/build/x86_64-unknown-linux-gnu/llvm/build" && CMAKE_PREFIX_PATH="" DESTDIR="" "cmake" "/rust/src/llvm-project/llvm" "-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_UNREACHABLE_OPTIMIZE=OFF" "-DLLVM_ENABLE_PLUGINS=OFF" "-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;BPF;Hexagon;LoongArch;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR;M68k;CSKY" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_INCLUDE_TESTS=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=12" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu" "-DLLVM_ENABLE_WARNINGS=OFF" "-DLLVM_INSTALL_UTILS=ON" "-DLLVM_ENABLE_ZSTD=OFF" "-DLLVM_ENABLE_ZLIB=ON" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_ENABLE_PROJECTS=clang" "-DLLVM_VERSION_SUFFIX=-rust-1.73.0-nightly" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER=cc" "-DCMAKE_CXX_COMPILER=c++" "-DCMAKE_ASM_COMPILER=cc" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_SHARED_LINKER_FLAGS= -Wl,-Bsymbolic -static-libstdc++" "-DCMAKE_MODULE_LINKER_FLAGS= -Wl,-Bsymbolic -static-libstdc++" "-DCMAKE_EXE_LINKER_FLAGS= -Wl,-Bsymbolic -static-libstdc++" "-DCMAKE_INSTALL_PREFIX=/rust/build/x86_64-unknown-linux-gnu/llvm" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_BUILD_TYPE=Release"
I expected to see this happen: Build success
Instead, this happened:
[ 34%] Built target llvm-config
[ 34%] Building BPFGenRegisterInfo.inc...
[ 34%] Building LoongArchGenAsmMatcher.inc...
[ 34%] Building BPFGenSubtargetInfo.inc...
[ 34%] Building AArch64GenExegesis.inc...
[ 34%] Building ARMGenDAGISel.inc...
[ 34%] Building ARMGenDisassemblerTables.inc...
[ 34%] Building HexagonGenDAGISel.inc...
[ 34%] Building HexagonGenDFAPacketizer.inc...
[ 34%] Built target BPFCommonTableGen
[ 34%] Building MSP430GenAsmMatcher.inc...
[ 34%] Building LoongArchGenAsmWriter.inc...
In file included from /rust/src/llvm-project/clang/include/clang/Basic/Specifiers.h:20,
from /rust/src/llvm-project/clang/include/clang/Basic/Diagnostic.h:20,
from /rust/src/llvm-project/clang/include/clang/AST/NestedNameSpecifier.h:18,
from /rust/src/llvm-project/clang/include/clang/AST/Type.h:21,
from /rust/src/llvm-project/clang/include/clang/AST/CanonicalType.h:17,
from /rust/src/llvm-project/clang/include/clang/AST/ASTContext.h:18,
from /rust/src/llvm-project/clang/lib/AST/AttrImpl.cpp:13:
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc: In static member function ‘static clang::AArch64SVEPcsAttr* clang::AArch64SVEPcsAttr::CreateImplicit(clang::ASTContext&, clang::SourceRange, Spelling)’:
/rust/src/llvm-project/llvm/include/llvm/Support/ErrorHandling.h:151:3: error: expected primary-expression before ‘do’
151 | do { \
| ^~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:39:6: note: in expansion of macro ‘llvm_unreachable’
39 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ^~~~~~~~~~~~~~~~
In file included from /rust/src/llvm-project/clang/lib/AST/AttrImpl.cpp:273:
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:39:6: error: expected ‘)’ before ‘do’
39 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ~^
| )
/rust/src/llvm-project/llvm/include/llvm/Support/ErrorHandling.h:154:5: error: expected ‘)’ before ‘while’
154 | } while (false)
| ^~~~~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:39:6: note: in expansion of macro ‘llvm_unreachable’
39 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ^~~~~~~~~~~~~~~~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:35:56: note: to match this ‘(’
35 | AttributeCommonInfo I(Range, NoSemaHandlerAttribute, (
| ^
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:39:172: error: expected ‘,’ or ‘;’ before ‘)’ token
39 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ^
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc: In static member function ‘static clang::AArch64SVEPcsAttr* clang::AArch64SVEPcsAttr::Create(clang::ASTContext&, clang::SourceRange, Spelling)’:
/rust/src/llvm-project/llvm/include/llvm/Support/ErrorHandling.h:151:3: error: expected primary-expression before ‘do’
151 | do { \
| ^~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:48:6: note: in expansion of macro ‘llvm_unreachable’
48 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ^~~~~~~~~~~~~~~~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:48:6: error: expected ‘)’ before ‘do’
48 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ~^
| )
/rust/src/llvm-project/llvm/include/llvm/Support/ErrorHandling.h:154:5: error: expected ‘)’ before ‘while’
154 | } while (false)
| ^~~~~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:48:6: note: in expansion of macro ‘llvm_unreachable’
48 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ^~~~~~~~~~~~~~~~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:44:56: note: to match this ‘(’
44 | AttributeCommonInfo I(Range, NoSemaHandlerAttribute, (
| ^
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:48:172: error: expected ‘,’ or ‘;’ before ‘)’ token
48 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ^
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc: In static member function ‘static clang::AArch64VectorPcsAttr* clang::AArch64VectorPcsAttr::CreateImplicit(clang::ASTContext&, clang::SourceRange, Spelling)’:
/rust/src/llvm-project/llvm/include/llvm/Support/ErrorHandling.h:151:3: error: expected primary-expression before ‘do’
151 | do { \
| ^~
/rust/build/x86_64-unknown-linux-gnu/llvm/build/tools/clang/include/clang/AST/AttrImpl.inc:128:6: note: in expansion of macro ‘llvm_unreachable’
128 | (llvm_unreachable("Unknown attribute spelling!"), AttributeCommonInfo::Form{AttributeCommonInfo::AS_GNU, 0, false /*IsAlignas*/, false /*IsRegularKeywordAttribute*/})));
| ^~~~~~~~~~~~~~~~
gmake[2]: *** [tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/build.make:230: tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/AttrImpl.cpp.o] Error 1
Version it worked on
Rust stable 1.72.1 release with LLVM 16
Version with regression
Rust stable branch and master branch containing LLVM 17
Build environment details
name | version |
---|---|
ubuntu | 23.04 |
cmake | 3.25.1 |
gcc | 12.3.0 |
g++ | 12.3.0 |
make | 4.3 |
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged