Skip to content

[Tracy] Update to v0.10 #11089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions L/LibTracyClient/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "LibTracyClient"
version = v"0.10.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/wolfpld/tracy.git",
"37aff70dfa50cf6307b3fee6074d627dc2929143"), # v0.10
DirectorySource("./bundled"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/tracy*/
if [[ "${target}" != *-mingw* ]]; then
echo "target_compile_definitions(TracyClient PUBLIC __STDC_FORMAT_MACROS)" >> CMakeLists.txt
else
echo "target_compile_definitions(TracyClient PUBLIC WINVER=0x0602 _WIN32_WINNT=0x0602)" >> CMakeLists.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, this was added by @topolarity for v0.9 in #6087 and I just copy-pasted.
Do you mean that I can just remove this 5 lines now ?

Copy link
Contributor Author

@blegat blegat Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably copied from https://github.com/JuliaLang/julia/blob/master/deps/libtracyclient.mk (which will also need an update together with this Yggdrasil recipe)

fi
atomic_patch -p1 ${WORKSPACE}/srcdir/patches/libTracyClient-freebsd-elfw.patch
cmake -B static -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DTRACY_FIBERS=ON -DTRACY_ONLY_LOCALHOST=ON -DTRACY_NO_CODE_TRANSFER=ON -DTRACY_NO_FRAME_IMAGE=ON -DTRACY_NO_CRASH_HANDLER=ON -DTRACY_ON_DEMAND=ON -DTRACY_NO_SAMPLING=ON -DTRACY_TIMER_FALLBACK=ON -DTRACY_PATCHABLE_NOPSLEDS=ON .
cd static
make -j${nproc}
make install
cd ..
cmake -B shared -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DTRACY_FIBERS=ON -DTRACY_ONLY_LOCALHOST=ON -DTRACY_NO_CODE_TRANSFER=ON -DTRACY_NO_FRAME_IMAGE=ON -DTRACY_NO_CRASH_HANDLER=ON -DTRACY_ON_DEMAND=ON -DTRACY_NO_SAMPLING=ON -DTRACY_TIMER_FALLBACK=ON -DTRACY_PATCHABLE_NOPSLEDS=ON .
cd shared
make -j${nproc}
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()

# The products that we will ensure are always built
products = [
LibraryProduct("libTracyClient", :libTracyClient),
FileProduct(["lib/libTracyClient.a", "lib/libTracyClient.lib"], :libTracyClient_static)
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[]

# Build the tarballs, and possibly a `build.jl` as well
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
julia_compat="1.6", preferred_gcc_version=v"7")
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/public/TracyClient.cpp b/public/TracyClient.cpp
index 77f81a4a..ebeb65c9 100644
--- a/public/TracyClient.cpp
+++ b/public/TracyClient.cpp
@@ -19,6 +19,28 @@
# pragma warning(push, 0)
#endif

+#ifndef ElfW
+# if defined(FREEBSD)
+# if __ELF_WORD_SIZE == 32
+# define ElfW(type) Elf32_##type
+# else
+# define ElfW(type) Elf64_##type
+# endif
+# elif defined(NETBSD) || defined(OPENBSD)
+# if ELFSIZE == 32
+# define ElfW(type) Elf32_##type
+# else
+# define ElfW(type) Elf64_##type
+# endif
+# else
+# if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
+# define ElfW(type) Elf32_##type
+# else
+# define ElfW(type) Elf64_##type
+# endif
+# endif
+#endif
+
#include "common/tracy_lz4.cpp"
#include "client/TracyProfiler.cpp"
#include "client/TracyCallstack.cpp"
13 changes: 4 additions & 9 deletions T/TracyProfiler/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using BinaryBuilder, Pkg

name = "TracyProfiler"
version = v"0.9.1"
version = v"0.10.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/wolfpld/tracy.git",
"897aec5b062664d2485f4f9a213715d2e527e0ca"), # v0.9.1
"37aff70dfa50cf6307b3fee6074d627dc2929143"), # v0.10
ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I should update this ? grep tells me that a few builds in Yggdrasil are using a more recent version : 13.3

"d3feee3ef9c6016b526e1901013f264467bb927865a03422a9cb925991cc9783"),
DirectorySource("./bundled"),
Expand Down Expand Up @@ -41,11 +41,6 @@ if [[ "${target}" == x86_64-apple-darwin* ]]; then
popd
fi

atomic_patch -p1 ../patches/TracyProfiler-nfd-extended-1.0.2.patch
atomic_patch -p1 ../patches/TracyProfiler-filter-user-text.patch
atomic_patch -p1 ../patches/TracyProfiler-no-divide-zero.patch
atomic_patch -p1 ../patches/TracyProfiler-rr-nopl-seq.patch

# Build / install the profiler GUI
make -e -j${nproc} -C profiler/build/unix LEGACY=1 IMAGE=tracy release
cp -v ./profiler/build/unix/tracy* $bindir
Expand Down Expand Up @@ -93,8 +88,8 @@ dependencies = [
Dependency("Dbus_jll", platforms=filter(Sys.islinux, platforms)),
Dependency("GLFW_jll"),
# Needed for `pkg-config glfw3`
Dependency("Xorg_xproto_jll", platforms=x11_platforms),
Dependency("Xorg_kbproto_jll", platforms=x11_platforms),
BuildDependency("Xorg_xproto_jll", platforms=x11_platforms),
BuildDependency("Xorg_kbproto_jll", platforms=x11_platforms),
]

# requires std-c++17, full support in gcc 7+, clang 8+
Expand Down
117 changes: 0 additions & 117 deletions T/TracyProfiler/bundled/patches/TracyProfiler-filter-user-text.patch

This file was deleted.

Loading