Change:
llvm-tblgen can not find Confirmed that g++/clang++ can generate correct minimal C++ binary (with libstdc++), but recently llvm-tblgen breaks. Steps to reproduce the behavior: recent nixpkgs/nixos-unstable the llvm-project LLVM Revision: Flags: Compile LLVM successfully as before Please run and paste the result.
According to some of my local tests, is important to reproduce. BFD linker gives me other warnings:
CC
Reduced repro:
Working fine with following shell.
Confirmed that this regression was introduced between and
I made a nix flake that reproduces this problem:
CC maintainers:
Does branch work for you? Chances are it is fixed by
Happy to test whether the current staging-next branch nixpkgs would solve the issue. However, after I switch to staging-next, lld14 and clang14 need to compile a lot of packages when I tried to enter shell. Is there any way to speed up the compilation? The solutions I think of are: increase the number of parallel compilations? , looking for binaryCache for staging-next? compiles the required dependencies almost sequentially, and a lot of time is spent on "configuring xx, checking for xxx" on a single core. Is there any way to increase the scale of parallelism? (I've set big-parallel option).
should increase job parallelism. should increase build parallelism within a job. If you want to build less you can sync to latest commit hydra already built for . For looks like is reasonably complete.
Thanks! Confirmed that the problem has been solved in .

Discussion:
# compile, because it uses "#include_next <limits.h>" to find the # limits.h file in ../includes-fixed. To remedy the problem, # another -idirafter is necessary to add that directory again. <del> # # We use --sysroot=/nix/store/does/not/exist to drop embedded default # path to glibc headers gcc was built against. Without it -idirafter # only appends to the list and outdated glibc headers end up being # used. 'cc-cflags-before' is used to allow user's --sysroot= option # to override our default. </del> + optionalString (libc != null) ('' touch "$out/nix-support/libc-cflags" touch "$out/nix-support/libc-ldflags" echo "-B${libc_lib}${libc.libdir or "/lib/"}" >> $out/nix-support/libc-crt1-cflags '' + optionalString (!(cc.langD or false)) '' <del> echo "--sysroot=/nix/store/does/not/exist" >> $out/nix-support/cc-cflags-before </del> echo "-idirafter ${libc_dev}${libc.incdir or "/include"}" >> $out/nix-support/libc-cflags '' + optionalString (isGNU && (!(cc.langD or false))) '' for dir in "${cc}"/lib/gcc/*/*/include-fixed; do

git ]; <del> # Workaround cc-wrapper's --sysroot= value for `staging-next`: it # breaks library lookup via RUNPATH: #   ld: warning: libm.so.6, needed by ./generated/linux/release/64/lib.so, not found (try using -rpath or -rpath-link) #   ld: /build/druntime/generated/linux/release/64/libdruntime.so: undefined reference to `log10@GLIBC_2.2.5' # TODO(trofi): remove the workaround once cc-wrapper is fixed. NIX_CFLAGS_COMPILE = [ "--sysroot=/" ]; </del> buildInputs = [ curl tzdata

NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [ "-UPIPE_SEARCH_DIR" "-DPIPE_SEARCH_DIR="${placeholder "opencl"}/lib/gallium-pipe"" <del> # Work around regression from https://github.com/NixOS/nixpkgs/pull/210004 # TODO(trofi): remove "--sysroot=/" </del> ]; passthru = {

passAsFile = [ "extraConfig" ]; <del> # Workaround '-idirafter' ordering bug in staging-next: #   https://github.com/NixOS/nixpkgs/pull/210004 # where libc '-idirafter' gets added after user's idirafter and # breaks. # TODO(trofi): remove it in staging once fixed in cc-wrapper. preConfigure = '' export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] buildPackages.stdenv.hostPlatform.config}=$(< ${buildPackages.stdenv.cc}/nix-support/libc-cflags) export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"]               stdenv.hostPlatform.config}=$(<               ${stdenv.cc}/nix-support/libc-cflags) ''; </del> configurePhase = '' runHook preConfigure

substituteInPlace src/util/genfsimg --replace "	syslinux " "	true " ''; # calling syslinux on a FAT image isn't going to work <del> # Workaround '-idirafter' ordering bug in staging-next: #   https://github.com/NixOS/nixpkgs/pull/210004 # where libc '-idirafter' gets added after user's idirafter and # breaks. # TODO(trofi): remove it in staging once fixed in cc-wrapper. preConfigure = '' export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] buildPackages.stdenv.hostPlatform.config}=$(< ${buildPackages.stdenv.cc}/nix-support/libc-cflags) export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"]               stdenv.hostPlatform.config}=$(<               ${stdenv.cc}/nix-support/libc-cflags) ''; </del> # not possible due to assembler code hardeningDisable = [ "pic" "stackprotector" ];

sourceRoot = "source/src"; <del> # Workaround '-idirafter' ordering bug in staging-next: #   https://github.com/NixOS/nixpkgs/pull/210004 # where libc '-idirafter' gets added after user's idirafter and # breaks. # TODO(trofi): remove it in staging once fixed in cc-wrapper. preConfigure = '' export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] stdenv.hostPlatform.config}=$(< ${stdenv.cc}/nix-support/libc-cflags) ''; </del> buildInputs = [ libbfd zlib libiberty ]; makeFlags = [ "wimboot.x86_64.efi" ];