Skip to content

Commit 3776e97

Browse files
author
Timothee Besset
committed
Fix the replay marker export
-rdynamic is a big hammer that shouldn't be necessary here.
1 parent 2b22a08 commit 3776e97

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

renderdoc/api/replay/apidefs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@
8484
#elif defined(RENDERDOC_PLATFORM_LINUX) || defined(RENDERDOC_PLATFORM_APPLE) || \
8585
defined(RENDERDOC_PLATFORM_ANDROID) || defined(RENDERDOC_PLATFORM_SWITCH)
8686

87+
#if defined(__GNUC__) && !defined(__clang__)
88+
#define RENDERDOC_EXPORT_API __attribute__((visibility("default"), externally_visible))
89+
#else
8790
#define RENDERDOC_EXPORT_API __attribute__((visibility("default"), used))
91+
#endif
8892
#define RENDERDOC_IMPORT_API
8993

9094
#define RENDERDOC_CC

renderdoc_exports.list

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
renderdoc_*;
3+
};

renderdoccmd/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ elseif(UNIX)
6767

6868
# Make sure that for the target executable we don't throw away
6969
# any shared libraries.
70-
set(LINKER_FLAGS "-Wl,--no-as-needed -rdynamic")
70+
set(LINKER_FLAGS "-Wl,--no-as-needed -Wl,--dynamic-list=${CMAKE_SOURCE_DIR}/renderdoc_exports.list")
7171
endif()
7272

7373
if(ANDROID)

0 commit comments

Comments
 (0)