Skip to content

Commit ce6244f

Browse files
committed
[tracy] update to 0.13
1 parent ae8fa5a commit ce6244f

File tree

16 files changed

+273
-25
lines changed

16 files changed

+273
-25
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2+
index 740b484..e4397a4 100644
3+
--- a/src/CMakeLists.txt
4+
+++ b/src/CMakeLists.txt
5+
@@ -128,6 +128,14 @@ set_target_properties(${TARGET_NAME} PROPERTIES
6+
7+
if (NFD_INSTALL)
8+
include(GNUInstallDirs)
9+
+ include(CMakePackageConfigHelpers)
10+
+
11+
+ write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-config-version.cmake"
12+
+ VERSION "${PROJECT_VERSION}"
13+
+ COMPATIBILITY SameMajorVersion
14+
+ )
15+
+
16+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-config-version.cmake" DESTINATION lib/cmake/${TARGET_NAME})
17+
18+
install(TARGETS ${TARGET_NAME} EXPORT ${TARGET_NAME}-export
19+
LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}

ports/nativefiledialog-extended/portfile.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ vcpkg_from_github(
44
REF v${VERSION}
55
SHA512 4ec3e174a90354c524d9be2776422740f80b73021df94e1942e60ab4310995245554f83097b9b2dcca04d016a8548d3fc0760f73daf724c5c3d72c15cf776bed
66
HEAD_REF master
7+
PATCHES
8+
fix-version.cmake
79
)
810

911
vcpkg_cmake_configure(

ports/nativefiledialog-extended/vcpkg.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "nativefiledialog-extended",
33
"version": "1.2.1",
4+
"port-version": 1,
45
"description": "Native File Dialog Extended",
56
"homepage": "https://github.com/btzy/nativefiledialog-extended",
67
"license": "Zlib",

ports/tidy-html5/fix-version.cmake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 8efec25..6007610 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -700,4 +700,13 @@ install(FILES
6+
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
7+
)
8+
9+
+
10+
+include(CMakePackageConfigHelpers)
11+
+
12+
+write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-tidy-html5Config-version.cmake"
13+
+ VERSION "${LIBTIDY_VERSION}"
14+
+ COMPATIBILITY SameMajorVersion
15+
+)
16+
+
17+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-tidy-html5Config-version.cmake DESTINATION ${LIB_INSTALL_DIR}/cmake/unofficial-tidy-html5)
18+
# eof

ports/tidy-html5/portfile.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ vcpkg_from_github(
1010
debug-postfix.patch
1111
fix_unsupport_func_uwp.patch
1212
cmake_find_package_support.patch
13+
fix-version.cmake
1314
)
1415

1516
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIB)

ports/tidy-html5/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tidy-html5",
33
"version": "5.8.0",
4-
"port-version": 2,
4+
"port-version": 3,
55
"description": "Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools.",
66
"homepage": "https://www.html-tidy.org",
77
"license": null,

ports/tracy/001-fix-tls.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/public/client/tracy_rpmalloc.cpp b/public/client/tracy_rpmalloc.cpp
2+
index c43b8cab..b739ffcb 100644
3+
--- a/public/client/tracy_rpmalloc.cpp
4+
+++ b/public/client/tracy_rpmalloc.cpp
5+
@@ -692,8 +692,6 @@ static pthread_key_t _memory_thread_heap;
6+
# else
7+
# if defined(__ANDROID__) && __ANDROID_API__ >= 29 && defined(__NDK_MAJOR__) && __NDK_MAJOR__ >= 26
8+
# define TLS_MODEL __attribute__((tls_model("local-dynamic")))
9+
-# elif !defined(__HAIKU__)
10+
-# define TLS_MODEL __attribute__((tls_model("initial-exec")))
11+
# else
12+
# define TLS_MODEL
13+
# endif

ports/tracy/disable-git.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt
2+
index d01731d3..1d36eee1 100644
3+
--- a/profiler/CMakeLists.txt
4+
+++ b/profiler/CMakeLists.txt
5+
@@ -266,7 +266,7 @@ if(NOT DEFINED GIT_REV)
6+
endif()
7+
8+
find_package(Git)
9+
-if(Git_FOUND)
10+
+if(0)
11+
add_custom_target(git-ref
12+
COMMAND ${CMAKE_COMMAND} -E echo "#pragma once" > GitRef.hpp.tmp
13+
COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR} log -1 "--format=namespace tracy { static inline const char* GitRef = %x22%h%x22; }" ${GIT_REV} >> GitRef.hpp.tmp || echo "namespace tracy { static inline const char* GitRef = \"unknown\"; }" >> GitRef.hpp.tmp
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp
2+
index c79948b8..7bd717b7 100644
3+
--- a/profiler/src/profiler/TracySourceView.cpp
4+
+++ b/profiler/src/profiler/TracySourceView.cpp
5+
@@ -713,7 +713,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
6+
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
7+
break;
8+
case CpuArchArm64:
9+
- rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle );
10+
+ rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
11+
break;
12+
default:
13+
assert( false );
14+
@@ -778,9 +778,9 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
15+
}
16+
break;
17+
case CpuArchArm64:
18+
- if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM )
19+
+ if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
20+
{
21+
- jumpAddr = (uint64_t)detail.aarch64.operands[0].imm;
22+
+ jumpAddr = (uint64_t)detail.arm64.operands[0].imm;
23+
}
24+
break;
25+
default:
26+
@@ -865,18 +865,18 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
27+
}
28+
break;
29+
case CpuArchArm64:
30+
- for( uint8_t i=0; i<detail.aarch64.op_count; i++ )
31+
+ for( uint8_t i=0; i<detail.arm64.op_count; i++ )
32+
{
33+
uint8_t type = 0;
34+
- switch( detail.aarch64.operands[i].type )
35+
+ switch( detail.arm64.operands[i].type )
36+
{
37+
- case AARCH64_OP_IMM:
38+
+ case ARM64_OP_IMM:
39+
type = 0;
40+
break;
41+
- case AARCH64_OP_REG:
42+
+ case ARM64_OP_REG:
43+
type = 1;
44+
break;
45+
- case AARCH64_OP_MEM:
46+
+ case ARM64_OP_MEM:
47+
type = 2;
48+
break;
49+
default:
50+
diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp
51+
index b1dffe1a..cb1e179f 100644
52+
--- a/server/TracyWorker.cpp
53+
+++ b/server/TracyWorker.cpp
54+
@@ -3912,7 +3912,7 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
55+
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
56+
break;
57+
case CpuArchArm64:
58+
- rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle );
59+
+ rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
60+
break;
61+
default:
62+
assert( false );
63+
@@ -3952,9 +3952,9 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
64+
}
65+
break;
66+
case CpuArchArm64:
67+
- if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM )
68+
+ if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
69+
{
70+
- callAddr = (uint64_t)detail.aarch64.operands[0].imm;
71+
+ callAddr = (uint64_t)detail.arm64.operands[0].imm;
72+
}
73+
break;
74+
default:
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
diff --git a/cmake/server.cmake b/cmake/server.cmake
2+
index a76d1c13..d8c1a26f 100644
3+
--- a/cmake/server.cmake
4+
+++ b/cmake/server.cmake
5+
@@ -29,7 +29,7 @@ list(TRANSFORM TRACY_SERVER_SOURCES PREPEND "${TRACY_SERVER_DIR}/")
6+
7+
add_library(TracyServer STATIC EXCLUDE_FROM_ALL ${TRACY_COMMON_SOURCES} ${TRACY_SERVER_SOURCES})
8+
target_include_directories(TracyServer PUBLIC ${TRACY_COMMON_DIR} ${TRACY_SERVER_DIR})
9+
-target_link_libraries(TracyServer PUBLIC TracyCapstone libzstd PPQSort::PPQSort)
10+
+target_link_libraries(TracyServer PUBLIC TracyCapstone zstd::libzstd PPQSort::PPQSort)
11+
if(NO_STATISTICS)
12+
target_compile_definitions(TracyServer PUBLIC TRACY_NO_STATISTICS)
13+
endif()
14+
diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake
15+
index a54f7c53..fa784dcb 100644
16+
--- a/cmake/vendor.cmake
17+
+++ b/cmake/vendor.cmake
18+
@@ -109,6 +109,7 @@ CPMAddPackage(
19+
NAME zstd
20+
GITHUB_REPOSITORY facebook/zstd
21+
GIT_TAG v1.5.7
22+
+ VERSION 1.5.6
23+
OPTIONS
24+
"ZSTD_BUILD_SHARED OFF"
25+
EXCLUDE_FROM_ALL TRUE
26+
@@ -136,6 +137,7 @@ target_include_directories(TracyGetOpt PUBLIC ${GETOPT_DIR})
27+
CPMAddPackage(
28+
NAME ImGui
29+
GITHUB_REPOSITORY ocornut/imgui
30+
+ FORCE TRUE
31+
GIT_TAG v1.92.1-docking
32+
DOWNLOAD_ONLY TRUE
33+
PATCHES
34+
@@ -198,7 +200,8 @@ CPMAddPackage(
35+
# json
36+
37+
CPMAddPackage(
38+
- NAME json
39+
+ NAME nlohmann_json
40+
+ VERSION 3.11.0
41+
GITHUB_REPOSITORY nlohmann/json
42+
GIT_TAG v3.12.0
43+
EXCLUDE_FROM_ALL TRUE
44+
@@ -233,7 +236,7 @@ if(NOT EMSCRIPTEN)
45+
# tidy
46+
47+
CPMAddPackage(
48+
- NAME tidy
49+
+ NAME unofficial-tidy-html5
50+
GITHUB_REPOSITORY htacg/tidy-html5
51+
GIT_TAG 5.8.0
52+
PATCHES
53+
@@ -246,6 +249,7 @@ if(NOT EMSCRIPTEN)
54+
CPMAddPackage(
55+
NAME usearch
56+
GITHUB_REPOSITORY unum-cloud/usearch
57+
+ VERSION 2.17.0
58+
GIT_TAG v2.19.1
59+
EXCLUDE_FROM_ALL TRUE
60+
)
61+
diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt
62+
index d01731d3..9c07e971 100644
63+
--- a/profiler/CMakeLists.txt
64+
+++ b/profiler/CMakeLists.txt
65+
@@ -242,7 +242,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
66+
TracyImGui
67+
Threads::Threads
68+
nlohmann_json::nlohmann_json
69+
- md4c
70+
+ md4c::md4c
71+
)
72+
target_include_directories(${PROJECT_NAME} PRIVATE
73+
${tidy_SOURCE_DIR}/include
74+
@@ -254,8 +254,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE
75+
if(NOT EMSCRIPTEN)
76+
target_link_libraries(${PROJECT_NAME} PRIVATE
77+
TracyLibcurl
78+
- base64
79+
- tidy-static
80+
+ aklomp::base64
81+
+ unofficial::tidy-html5::tidy
82+
TracyPugixml
83+
usearch
84+
)

0 commit comments

Comments
 (0)