Merge pull request #223835 from maxammann/fix-tracy-macos
tracy: fix build on macos (fixes #223469)
This commit is contained in:
commit
0a5c42df2a
|
@ -0,0 +1,13 @@
|
|||
diff --git a/profiler/build/unix/legacy.mk b/profiler/build/unix/legacy.mk
|
||||
index 24765f1a..8baffb68 100644
|
||||
--- a/profiler/build/unix/legacy.mk
|
||||
+++ b/profiler/build/unix/legacy.mk
|
||||
@@ -16,7 +16,7 @@ else
|
||||
UNAME := $(shell uname -s)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
SRC3 += ../../../nfd/nfd_cocoa.m
|
||||
- LIBS += -framework CoreFoundation -framework AppKit -framework UniformTypeIdentifiers
|
||||
+ LIBS += -framework CoreFoundation -framework AppKit
|
||||
else
|
||||
ifdef TRACY_GTK_FILESELECTOR
|
||||
SRC += ../../../nfd/nfd_gtk.cpp
|
|
@ -1,25 +1,29 @@
|
|||
{ stdenv, lib, darwin, fetchFromGitHub
|
||||
, tbb, gtk3, glfw, pkg-config, freetype, Carbon, AppKit, capstone, dbus
|
||||
, tbb, glfw, pkg-config, freetype, Carbon, AppKit, capstone, dbus, hicolor-icon-theme
|
||||
}:
|
||||
|
||||
let
|
||||
disableLTO = stdenv.cc.isClang && stdenv.isDarwin; # workaround issue #19098
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "tracy";
|
||||
version = "0.9";
|
||||
version = "0.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wolfpld";
|
||||
repo = "tracy";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-cdVkY1dSag37JdbsoJp2/0QHO5G+zsftqwBVqRpMiew=";
|
||||
sha256 = "sha256-K1lQNRS8+ju9HyKNVXtHqslrPWcPgazzTitvwkIO3P4";
|
||||
};
|
||||
|
||||
patches = [ ]
|
||||
++ lib.optionals (stdenv.isDarwin && !(lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11")) [ ./0001-remove-unifiedtypeidentifiers-framework ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ glfw capstone ]
|
||||
++ lib.optionals stdenv.isDarwin [ Carbon AppKit freetype ]
|
||||
++ lib.optionals stdenv.isLinux [ gtk3 tbb dbus ];
|
||||
++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") [ darwin.apple_sdk.frameworks.UniformTypeIdentifiers ]
|
||||
++ lib.optionals stdenv.isLinux [ tbb dbus hicolor-icon-theme freetype ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString ([ ]
|
||||
# Apple's compiler finds a format string security error on
|
||||
|
@ -32,7 +36,7 @@ in stdenv.mkDerivation rec {
|
|||
NIX_CFLAGS_LINK = lib.optional disableLTO "-fno-lto";
|
||||
|
||||
buildPhase = ''
|
||||
make -j $NIX_BUILD_CORES -C profiler/build/unix release
|
||||
make -j $NIX_BUILD_CORES -C profiler/build/unix release LEGACY=1
|
||||
make -j $NIX_BUILD_CORES -C import-chrome/build/unix/ release
|
||||
make -j $NIX_BUILD_CORES -C capture/build/unix/ release
|
||||
make -j $NIX_BUILD_CORES -C update/build/unix/ release
|
||||
|
|
Loading…
Reference in a new issue