Merge pull request #118611 from risicle/ris-tracy-darwin-fix
tracy: force-disable LTO for darwin
This commit is contained in:
commit
a64eb90739
1 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
{ stdenv, lib, darwin, fetchFromGitHub, tbb, gtk3, glfw, pkg-config, freetype, Carbon, AppKit, capstone }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let
|
||||
disableLTO = stdenv.cc.isClang && stdenv.isDarwin; # workaround issue #19098
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "tracy";
|
||||
version = "0.7.7";
|
||||
|
||||
|
@ -19,7 +21,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
NIX_CFLAGS_COMPILE = [ ]
|
||||
++ lib.optional stdenv.isLinux "-ltbb"
|
||||
++ lib.optional stdenv.cc.isClang "-faligned-allocation";
|
||||
++ lib.optional stdenv.cc.isClang "-faligned-allocation"
|
||||
++ lib.optional disableLTO "-fno-lto";
|
||||
|
||||
NIX_CFLAGS_LINK = lib.optional disableLTO "-fno-lto";
|
||||
|
||||
buildPhase = ''
|
||||
make -j $NIX_BUILD_CORES -C profiler/build/unix release
|
||||
|
@ -35,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||
install -D ./update/build/unix/update-release $out/bin/update
|
||||
'';
|
||||
|
||||
fixupPhase = lib.optionalString stdenv.isDarwin ''
|
||||
postFixup = lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -change libcapstone.4.dylib ${capstone}/lib/libcapstone.4.dylib $out/bin/Tracy
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue