llvmPackages_16: Fix an evaluation error from setting NIX_CFLAGS_COMPILE

This code is backported from nixos-unstable (2c627d9c70) and isn't
fully compatible with NixOS 22.11 due to other missing
abstractions/changes. I simply went with the exact same code as the
other llvmPackages already use here. This fixes the following error:
```
error: cannot coerce a set to a string

        at pkgs/development/compilers/llvm/16/compiler-rt/default.nix:34:3:

            33|
            34|   env.NIX_CFLAGS_COMPILE = toString [
              |   ^
            35|     "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
```
This commit is contained in:
Michael Weiss
2023-05-06 13:53:29 +02:00
parent 168ba05f40
commit 2cdddaa5e2

View File

@@ -31,7 +31,7 @@ stdenv.mkDerivation {
++ lib.optional stdenv.isDarwin xcbuild.xcrun;
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
env.NIX_CFLAGS_COMPILE = toString [
NIX_CFLAGS_COMPILE = [
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
];