lol

Merge pull request #118611 from risicle/ris-tracy-darwin-fix

tracy: force-disable LTO for darwin

authored by

Sandro and committed by
GitHub
a64eb907 b3a18f4d

+8 -3
+8 -3
pkgs/development/tools/tracy/default.nix
··· 1 1 { stdenv, lib, darwin, fetchFromGitHub, tbb, gtk3, glfw, pkg-config, freetype, Carbon, AppKit, capstone }: 2 2 3 - stdenv.mkDerivation rec { 3 + let 4 + disableLTO = stdenv.cc.isClang && stdenv.isDarwin; # workaround issue #19098 5 + in stdenv.mkDerivation rec { 4 6 pname = "tracy"; 5 7 version = "0.7.7"; 6 8 ··· 19 21 20 22 NIX_CFLAGS_COMPILE = [ ] 21 23 ++ lib.optional stdenv.isLinux "-ltbb" 22 - ++ lib.optional stdenv.cc.isClang "-faligned-allocation"; 24 + ++ lib.optional stdenv.cc.isClang "-faligned-allocation" 25 + ++ lib.optional disableLTO "-fno-lto"; 26 + 27 + NIX_CFLAGS_LINK = lib.optional disableLTO "-fno-lto"; 23 28 24 29 buildPhase = '' 25 30 make -j $NIX_BUILD_CORES -C profiler/build/unix release ··· 35 40 install -D ./update/build/unix/update-release $out/bin/update 36 41 ''; 37 42 38 - fixupPhase = lib.optionalString stdenv.isDarwin '' 43 + postFixup = lib.optionalString stdenv.isDarwin '' 39 44 install_name_tool -change libcapstone.4.dylib ${capstone}/lib/libcapstone.4.dylib $out/bin/Tracy 40 45 ''; 41 46