aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMake
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2021-12-27 14:09:57 +0300
committerlevlam <levlam@telegram.org>2021-12-27 14:09:57 +0300
commit7d5d7eb9900dc207cf5733c2bc3b8adf1028d2e4 (patch)
treea858d01def543a4fddc75578aaf3bc6c76e23140 /CMake
parent26d2ee649deeb6529bb9280b012b88e48ba0bbff (diff)
Fix tdweb building.
Diffstat (limited to 'CMake')
-rw-r--r--CMake/TdSetUpCompiler.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMake/TdSetUpCompiler.cmake b/CMake/TdSetUpCompiler.cmake
index 62013f52a..b31c7f049 100644
--- a/CMake/TdSetUpCompiler.cmake
+++ b/CMake/TdSetUpCompiler.cmake
@@ -60,6 +60,8 @@ function(td_set_up_compiler)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
if (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
set(TD_LINKER_FLAGS "-Wl,-z,ignore")
+ elseif (EMSCRIPTEN)
+ set(TD_LINKER_FLAGS "-Wl,--gc-sections")
else()
set(TD_LINKER_FLAGS "-Wl,--gc-sections -Wl,--exclude-libs,ALL")
endif()