Skip to content

Commit

Permalink
try to link with clang lld
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Jan 4, 2025
1 parent 18ae650 commit 8bc3bbd
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,13 @@ if (NOT EXISTS ${WEBRTCOBJS}/${CMAKE_STATIC_LIBRARY_PREFIX}webrtc${CMAKE_STATIC_
endif()

#patch
# file(READ ${WEBRTCROOT}/src/rtc_base/ssl_stream_adapter.h filecontent)
# string(REPLACE "#include <vector>" "#include <vector>\n#include <optional>" filecontent "${filecontent}")
# file(WRITE ${WEBRTCROOT}/src/rtc_base/ssl_stream_adapter.h "${filecontent}")

file(READ ${WEBRTCROOT}/src/third_party/perfetto/include/perfetto/tracing/track.h filecontent)
string(REPLACE "#include <map>" "#include <map>\n#include <optional>" filecontent "${filecontent}")
file(WRITE ${WEBRTCROOT}/src/third_party/perfetto/include/perfetto/tracing/track.h "${filecontent}")

# file(READ ${WEBRTCROOT}/src/media/base/media_channel.h filecontent)
# string(REGEX REPLACE "ost << ToStringIfSet[^;]*;" "" filecontent "${filecontent}")
# file(WRITE ${WEBRTCROOT}/src/media/base/media_channel.h "${filecontent}")
file(READ ${WEBRTCROOT}/src/media/base/media_channel.h filecontent)
string(REGEX REPLACE "ost << ToStringIfSet[^;]*;" "" filecontent "${filecontent}")
file(WRITE ${WEBRTCROOT}/src/media/base/media_channel.h "${filecontent}")


# sound support
Expand Down Expand Up @@ -262,6 +258,9 @@ if (WIN32)
add_definitions(-DUSE_X11 -DHAVE_SOUND -D_WINSOCKAPI_)
target_link_libraries (${CMAKE_PROJECT_NAME} secur32 dmoguids wmcodecdspuuid strmiids msdmo winmm dxgi d3d11 iphlpapi dwmapi shcore)
elseif (APPLE)
# use lld to link
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld -B${WEBRTCROOT}/src/third_party/llvm-build/Release+Asserts/bin")

# live555
add_definitions(-DNEED_XLOCALE_H=1)
# webrtc
Expand Down

0 comments on commit 8bc3bbd

Please sign in to comment.