Skip to content

Commit

Permalink
prusa-slicer: build with clang
Browse files Browse the repository at this point in the history
See comment for why.
  • Loading branch information
K900 committed Aug 1, 2024
1 parent ec935c5 commit 2ab6654
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkgs/applications/misc/prusa-slicer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ stdenv.mkDerivation (finalAttrs: {
# prusa-slicer uses dlopen on `libudev.so` at runtime
NIX_LDFLAGS = lib.optionalString withSystemd "-ludev";

# FIXME: remove in 2.8.0
NIX_CFLAGS_COMPILE = "-Wno-enum-constexpr-conversion";

prePatch = ''
# Since version 2.5.0 of nlopt we need to link to libnlopt, as libnlopt_cxx
# now seems to be integrated into the main lib.
Expand Down
5 changes: 4 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33835,7 +33835,10 @@ with pkgs;
printrun = callPackage ../applications/misc/printrun { };

prusa-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer {
stdenv = if stdenv.isDarwin then overrideSDK llvmPackages_14.stdenv "11.0" else stdenv;
# Build with clang even on Linux, because GCC uses absolutely obscene amounts of memory
# on this particular code base (OOM with 32GB memory and --cores 16 on GCC, succeeds
# with --cores 32 on clang).
stdenv = if stdenv.isDarwin then overrideSDK llvmPackages.stdenv "11.0" else llvmPackages.stdenv;
};

super-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer/super-slicer.nix { };
Expand Down

0 comments on commit 2ab6654

Please sign in to comment.