[clang] [llvm] Enable ClangIR Build By Default (PR #221291)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 21 08:51:53 PDT 2026
ilovepi wrote:
This is breaking our Linux CI. Looks to me like there's some assumptions about what's in the sysroot headers, and how macros are allowed/expected to be defined? Standard clang builds haven't had this issue, so I'm guessing you lack coverage on intentionally old sysroots or there's some bit of the build config that isn't well tested across all the various cmake options.
Bot: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8667324817978802465/+/u/clang/build/stdout
CMake: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8667324817978802465/+/u/clang/configure/l_execution_details
Logs: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8667324817978802465/+/u/clang/build/stdout
Error:
```
[6310/6623](26) Building CXX object tools/clang/lib/CIR/Dialect/IR/CMakeFiles/obj.MLIRCIR.dir/CIRAttrs.cpp.o
FAILED: tools/clang/lib/CIR/Dialect/IR/CMakeFiles/obj.MLIRCIR.dir/CIRAttrs.cpp.o
/b/s/w/ir/x/w/rc/cxx-rbecv4cts5q/reclient-cxx-wrapper.sh /b/s/w/ir/x/w/cipd/bin/clang++ --sysroot=/b/s/w/ir/x/w/cipd/linux -DCLANG_EXPORTS -DCLANG_REPOSITORY_STRING=\"https://llvm.googlesource.com/llvm-project\" -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/s/w/ir/x/w/llvm_build/tools/clang/lib/CIR/Dialect/IR -I/b/s/w/ir/x/w/llvm-llvm-project/clang/lib/CIR/Dialect/IR -I/b/s/w/ir/x/w/llvm-llvm-project/clang/include -I/b/s/w/ir/x/w/llvm_build/tools/clang/include -I/b/s/w/ir/x/w/llvm_build/include -I/b/s/w/ir/x/w/llvm-llvm-project/llvm/include -I/b/s/w/ir/x/w/llvm-llvm-project/llvm/../mlir/include -I/b/s/w/ir/x/w/llvm_build/tools/mlir/include -I/b/s/w/ir/x/w/install-zlib-x86_64-linux-gnu/include -I/b/s/w/ir/x/w/install-zstd-x86_64-linux-gnu/include -stdlib=libc++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -ffat-lto-objects -ffile-prefix-map=/b/s/w/ir/x/w/llvm_build=../llvm-llvm-project -ffile-prefix-map=/b/s/w/ir/x/w/llvm-llvm-project/= -no-canonical-prefixes -fno-common -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fvisibility=default -UNDEBUG -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Winvalid-pch -Xclang -include-pch -Xclang /b/s/w/ir/x/w/llvm_build/tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /b/s/w/ir/x/w/llvm_build/tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/cmake_pch.hxx -MD -MT tools/clang/lib/CIR/Dialect/IR/CMakeFiles/obj.MLIRCIR.dir/CIRAttrs.cpp.o -MF tools/clang/lib/CIR/Dialect/IR/CMakeFiles/obj.MLIRCIR.dir/CIRAttrs.cpp.o.d -o tools/clang/lib/CIR/Dialect/IR/CMakeFiles/obj.MLIRCIR.dir/CIRAttrs.cpp.o -c /b/s/w/ir/x/w/llvm-llvm-project/clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
In file included from /b/s/w/ir/x/w/llvm-llvm-project/clang/lib/CIR/Dialect/IR/CIRAttrs.cpp:61:
/b/s/w/ir/x/w/llvm_build/tools/clang/include/clang/CIR/Dialect/IR/CIROpsAttributes.cpp.inc:8084:60: error: member initializer 'gnu_dev_major' does not name a non-static data member or base class
8084 | OpenCLVersionAttrStorage(int32_t major, int32_t minor) : major(std::move(major)), minor(std::move(minor)) {}
| ^~~~~~~~~~~~~~~~~~~~~~~
/b/s/w/ir/x/w/cipd/linux/usr/include/x86_64-linux-gnu/sys/sysmacros.h:61:20: note: expanded from macro 'major'
61 | #define major(dev) gnu_dev_major (dev)
| ^~~~~~~~~~~~~~~~~~~
In file included from /b/s/w/ir/x/w/llvm-llvm-project/clang/lib/CIR/Dialect/IR/CIRAttrs.cpp:61:
/b/s/w/ir/x/w/llvm_build/tools/clang/include/clang/CIR/Dialect/IR/CIROpsAttributes.cpp.inc:8084:85: error: member initializer 'gnu_dev_minor' does not name a non-static data member or base class
8084 | OpenCLVersionAttrStorage(int32_t major, int32_t minor) : major(std::move(major)), minor(std::move(minor)) {}
| ^~~~~~~~~~~~~~~~~~~~~~~
/b/s/w/ir/x/w/cipd/linux/usr/include/x86_64-linux-gnu/sys/sysmacros.h:62:20: note: expanded from macro 'minor'
62 | #define minor(dev) gnu_dev_minor (dev)
| ^~~~~~~~~~~~~~~~~~~
2 errors generated.
```
https://github.com/llvm/llvm-project/pull/221291
More information about the cfe-commits
mailing list