Skip to content

Commit

Permalink
Merge pull request #20799 from midronij/remove-lib-conditions
Browse files Browse the repository at this point in the history
Remove conditional linking of libraries
  • Loading branch information
jdmpapin authored Dec 19, 2024
2 parents 8a06d93 + a537a2e commit 0e60416
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 90 deletions.
136 changes: 46 additions & 90 deletions runtime/gcchk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,52 +29,30 @@ j9vm_add_library(j9gcchk SHARED
${gcchk_sources}
)

if(DEFINED OMR_OS_AIX AND DEFINED CMAKE_C_COMPILER_IS_OPENXL)
target_link_libraries(j9gcchk
PRIVATE
j9vm_interface
j9util
j9utilcore
j9avl
j9hashtable
j9thr
j9stackmap
j9pool
j9hookable
j9modronstartup

#TODO do we just want to link against j9gc?
j9gcbase
j9gcstructs
j9gcstats
j9gccheck
omrgc
j9gctrc
j9gctrcstandard
j9gctrcvlhgc
j9gc
)
else()
target_link_libraries(j9gcchk
PRIVATE
j9vm_interface
j9util
j9utilcore
j9avl
j9hashtable
j9thr
j9stackmap
j9pool
j9hookable
target_link_libraries(j9gcchk
PRIVATE
j9vm_interface
j9util
j9utilcore
j9avl
j9hashtable
j9thr
j9stackmap
j9pool
j9hookable
j9modronstartup

#TODO do we just want to link against j9gc?
j9gcbase
j9gcstructs
j9gcstats
j9gccheck
omrgc
)
endif()
#TODO do we just want to link against j9gc?
j9gcbase
j9gcstructs
j9gcstats
j9gccheck
omrgc
j9gctrc
j9gctrcstandard
j9gctrcvlhgc
j9gc
)

omr_add_exports(j9gcchk J9VMDllMain)

Expand All @@ -90,52 +68,30 @@ if(OMR_MIXED_REFERENCES_MODE_STATIC)
${gcchk_sources}
)

if(DEFINED OMR_OS_AIX AND DEFINED CMAKE_C_COMPILER_IS_OPENXL)
target_link_libraries(j9gcchk_full
PRIVATE
j9vm_interface
j9util
j9utilcore
j9avl
j9hashtable
j9thr
j9stackmap
j9pool
j9hookable
j9modronstartup

#TODO do we just want to link against j9gc?
j9gcbase_full
j9gcstructs_full
j9gcstats_full
j9gccheck_full
omrgc_full
j9gctrc_full
j9gctrcstandard_full
j9gctrcvlhgc_full
j9gc_full
)
else()
target_link_libraries(j9gcchk_full
PRIVATE
j9vm_interface
j9util
j9utilcore
j9avl
j9hashtable
j9thr
j9stackmap
j9pool
j9hookable
target_link_libraries(j9gcchk_full
PRIVATE
j9vm_interface
j9util
j9utilcore
j9avl
j9hashtable
j9thr
j9stackmap
j9pool
j9hookable
j9modronstartup

#TODO do we just want to link against j9gc?
j9gcbase_full
j9gcstructs_full
j9gcstats_full
j9gccheck_full
omrgc_full
)
endif()
#TODO do we just want to link against j9gc?
j9gcbase_full
j9gcstructs_full
j9gcstats_full
j9gccheck_full
omrgc_full
j9gctrc_full
j9gctrcstandard_full
j9gctrcvlhgc_full
j9gc_full
)

omr_add_exports(j9gcchk_full J9VMDllMain)

Expand Down
10 changes: 10 additions & 0 deletions runtime/verbose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ target_link_libraries(j9vrb
j9gcvrbhdlrvlhgc
j9zip
j9utilcore
j9gc
j9gctrc
j9gcapi
j9gctrcstandard
j9gctrcvlhgc
)

target_compile_definitions(j9vrb
Expand Down Expand Up @@ -138,6 +143,11 @@ if(OMR_MIXED_REFERENCES_MODE_STATIC)
j9gcvrbhdlrvlhgc_full
j9zip
j9utilcore
j9gc
j9gctrc
j9gcapi
j9gctrcstandard
j9gctrcvlhgc
)

target_compile_definitions(j9vrb_full
Expand Down
1 change: 1 addition & 0 deletions runtime/verbose/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<library name="j9modronstartup"/>
<library name="omrgcstartup" type="external"/>
<library name="omrgcverbose" type="external"/>
<library name="j9gc"/>
<library name="j9gcvrbjava"/>
<library name="j9gcvrbold"/>
<library name="j9gcvrbevents"/>
Expand Down

0 comments on commit 0e60416

Please sign in to comment.