mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-23 23:23:13 +01:00
on APPLE, allow undefined symbols (for __Dmain) when linking druntime & phobos
This commit is contained in:
@@ -29,6 +29,9 @@ set(D_FLAGS -g -w -d CACHE STRING "runtime build flags, separated by ;")
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
list(APPEND D_FLAGS -relocation-model=pic)
|
||||
if(APPLE)
|
||||
list(APPEND LD_FLAGS -Wl,-undefined,dynamic_lookup)
|
||||
endif()
|
||||
set(D_LIBRARY_TYPE SHARED)
|
||||
else(BUILD_SHARED_LIBS)
|
||||
set(D_LIBRARY_TYPE STATIC)
|
||||
@@ -352,10 +355,10 @@ endmacro(build_runtime d_flags c_flags ld_flags lib_suffix path_suffix)
|
||||
if(PHOBOS2_DIR)
|
||||
add_custom_target(phobos2)
|
||||
endif(PHOBOS2_DIR)
|
||||
build_runtime("" "" "" "" "${LIB_SUFFIX}")
|
||||
build_runtime("" "" "${LD_FLAGS}" "" "${LIB_SUFFIX}")
|
||||
set(GENERATE_DI "")
|
||||
if(MULTILIB)
|
||||
build_runtime("-m${MULTILIB_SUFFIX}" "-m${MULTILIB_SUFFIX}" "-m${MULTILIB_SUFFIX}" "" "${MULTILIB_SUFFIX}")
|
||||
build_runtime("-m${MULTILIB_SUFFIX}" "-m${MULTILIB_SUFFIX}" "-m${MULTILIB_SUFFIX} ${LD_FLAGS}" "" "${MULTILIB_SUFFIX}")
|
||||
endif(MULTILIB)
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user