CMake: Revert to multiple object files for shared druntime

As compiling Phobos to a single object file apparently really works
already.
This commit is contained in:
Martin Kinkelin 2021-06-10 23:51:07 +02:00
parent 6ec7c11adc
commit df48648f99

View file

@ -750,12 +750,12 @@ macro(build_runtime_variant d_flags c_flags ld_flags lib_suffix path_suffix emit
endif()
# shared druntime/Phobos
if(NOT ${BUILD_SHARED_LIBS} STREQUAL "OFF")
# compile druntime with public visibility and extra `version (Shared)` (and preferably to a single object file)
# compile druntime with public visibility and extra `version (Shared)`
set(druntime_o "")
set(druntime_bc "")
compile_druntime("${druntime_d_flags};-relocation-model=pic;-fvisibility=public;-d-version=Shared"
"${lib_suffix}${SHARED_LIB_SUFFIX}" "${path_suffix}"
"OFF" "${all_d_files_at_once}" "${all_d_files_at_once}" druntime_o druntime_bc)
"OFF" "${all_d_files_at_once}" "OFF" druntime_o druntime_bc)
# compile Phobos with public visibility (and preferably to a single object file)
if(phobos2_common STREQUAL "")