Skip to content

Commit 85613ac

Browse files
committed
Export map for shared library symbols
1 parent eaa7173 commit 85613ac

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ endif()
2727
option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so)" ON)
2828
option(BUILD_STATIC_LIBS "Build static libraries (.lib/.a)" OFF)
2929

30+
# Shared library versioning support
31+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libllhttp.map")
32+
3033
# Source code
3134
set(LLHTTP_SOURCES
3235
${CMAKE_CURRENT_SOURCE_DIR}/src/llhttp.c

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ release: clean generate
5454
cp -rf src/common.gypi release/
5555
sed s/_RELEASE_/$(RELEASE)/ CMakeLists.txt > release/CMakeLists.txt
5656
cp -rf libllhttp.pc.in release/
57+
cp -rf libllhttp.map release/
5758
cp -rf README.md release/
5859
cp -rf LICENSE release/
5960

libllhttp.map

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
global:
3+
*;
4+
local:
5+
llhttp__internal_*;
6+
};

0 commit comments

Comments
 (0)