Skip to content

Commit

Permalink
CMake: Revert to multiple object files for shared druntime
Browse files Browse the repository at this point in the history
As compiling Phobos to a single object file apparently really works
already.
  • Loading branch information
kinke committed Jun 10, 2021
1 parent 1bf0632 commit c623ffd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,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 "")
Expand Down

0 comments on commit c623ffd

Please sign in to comment.