-
Notifications
You must be signed in to change notification settings - Fork 587
[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
blegat
wants to merge
2
commits into
JuliaPackaging:master
Choose a base branch
from
blegat:[email protected]
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Tracy] Update to v0.10 #11089
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
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") |
33 changes: 33 additions & 0 deletions
33
L/LibTracyClient/[email protected]/bundled/patches/libTracyClient-freebsd-elfw.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if I should update this ? |
||
"d3feee3ef9c6016b526e1901013f264467bb927865a03422a9cb925991cc9783"), | ||
DirectorySource("./bundled"), | ||
|
@@ -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 | ||
|
@@ -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+ | ||
|
117 changes: 0 additions & 117 deletions
117
T/TracyProfiler/bundled/patches/TracyProfiler-filter-user-text.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? We already define these macros at newer values: https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/45acaa5c78a091ef75e5daa5de7a8676600509a5/src/Runner.jl#L555
There was a problem hiding this comment.
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 ?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also in line 26 of T/TracyProfiler/build_tarballs.jl
There was a problem hiding this comment.
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)