@@ -27,12 +27,18 @@ set(COMMON_CMAKE_ARGUMENTS "-std=c++11 -stdlib=libc++ -Werror -Wno-unused-result
2727# AOSP has switched to using LLD by default and the NDK will use it by default in the next release.
2828# BFD and Gold will be removed once LLD has been through a release cycle with no major unresolved issues (estimated r21)
2929# Note: lld does not currently work on Windows: https://github.com/android-ndk/ndk/issues/888
30- if (NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows" )
31- MESSAGE (STATUS "## Using LLD linker" )
32- set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld" )
33- else ()
34- MESSAGE (STATUS "## Using default linker" )
35- endif ()
30+
31+ # On MacOS using LLD seems problematic as it does not add the correct path for the libNativeScript.so dSYM.
32+ # This issue affects debugging the C++ part of the runtime.
33+ # Manually performing "add-dsym <lib-path>" in the LLDB console seems to fix that.
34+ # We should try using LLD again once it's the default linker for the NDK.
35+
36+ #if (NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
37+ # MESSAGE(STATUS "## Using LLD linker")
38+ # set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
39+ #else ()
40+ # MESSAGE(STATUS "## Using default linker")
41+ #endif ()
3642
3743# Command info: https://cmake.org/cmake/help/v3.4/command/include_directories.html
3844include_directories (
@@ -183,7 +189,7 @@ if (OPTIMIZED_BUILD OR OPTIMIZED_WITH_INSPECTOR_BUILD)
183189 )
184190else ()
185191 set_target_properties (
186- NativeScript PROPERTIES LINK_FLAGS -Wl,--allow-multiple-definition
192+ NativeScript PROPERTIES LINK_FLAGS " -Wl,--allow-multiple-definition"
187193 INTERFACE_INCLUDE_DIRECTORIES NATIVES_BLOB_INCLUDE_DIRECTORIES
188194 )
189195endif ()
0 commit comments