mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Restructure the COFF metadata handling to use the linker section grouping to emit section start/stop markers in the appropriate location. This allows us to lookup the sections statically without having to the walk the entire image structure. Introduce a constructor for PE/COFF binaries. This will ensure that the registration occurs for all modules appropriately. This should resolve rdar://problem/19045112. The registration should occur prior to `DllMain` being invoked from `DllMainCRTStartup`.
14 lines
629 B
CMake
14 lines
629 B
CMake
# HACK: Force this library to build with undefined symbols.
|
|
string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
|
|
|
# libswiftRemoteMirror.dylib should not have runtime dependencies; it's
|
|
# always built as a shared library.
|
|
if(SWIFT_BUILD_DYNAMIC_STDLIB OR SWIFT_BUILD_REMOTE_MIRROR)
|
|
add_swift_library(swiftRemoteMirror SHARED TARGET_LIBRARY DONT_EMBED_BITCODE NOSWIFTRT
|
|
SwiftRemoteMirror.cpp
|
|
LINK_LIBRARIES swiftReflection
|
|
C_COMPILE_FLAGS ${SWIFT_RUNTIME_CXX_FLAGS}
|
|
LINK_FLAGS ${SWIFT_RUNTIME_LINK_FLAGS}
|
|
INSTALL_IN_COMPONENT swift-remote-mirror)
|
|
endif()
|