Skip to content

Commit b3e11a1

Browse files
committed
Add OMR_GC_GLUE_FULL_TARGET handling for mixedrefs static mode
Signed-off-by: Sharon Wang <[email protected]>
1 parent 9473e67 commit b3e11a1

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

cmake/config.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ set(OMR_TRACE_LIB "omrtrace" CACHE STRING "Name of the trace library to link aga
116116
###
117117

118118
set(OMR_GC_GLUE_TARGET "NOTFOUND" CACHE STRING "The gc glue target, must be interface library")
119+
set(OMR_GC_GLUE_FULL_TARGET "NOTFOUND" CACHE STRING "The gc glue full target, must be interface library")
119120
set(OMR_UTIL_GLUE_TARGET "NOTFOUND" CACHE STRING "The util glue target, must be interface library")
120121
set(OMR_RAS_GLUE_TARGET "NOTFOUND" CACHE STRING "The ras glue target, must be interface library")
121122
set(OMR_CORE_GLUE_TARGET "NOTFOUND" CACHE STRING "The core glue target, must be and interface library")

gc/CMakeLists.txt

+9-6
Original file line numberDiff line numberDiff line change
@@ -412,22 +412,18 @@ set(gc_include_public
412412
verbose
413413
verbose/handler_standard
414414
)
415-
set(gc_include_interface
416-
$<TARGET_PROPERTY:${OMR_GC_GLUE_TARGET},INTERFACE_INCLUDE_DIRECTORIES>
417-
)
418415

419416
target_include_directories(omrgc
420417
PUBLIC
421418
${gc_include_public}
422419
INTERFACE
423-
${gc_include_interface}
420+
$<TARGET_PROPERTY:${OMR_GC_GLUE_TARGET},INTERFACE_INCLUDE_DIRECTORIES>
424421
)
425422

426423
set(gc_link_libraries_public
427424
omr_base
428425
)
429426
set(gc_link_libraries_private
430-
${OMR_GC_GLUE_TARGET}
431427
omrutil
432428
omrcore
433429
${OMR_THREAD_LIB}
@@ -439,13 +435,19 @@ target_link_libraries(omrgc
439435
PUBLIC
440436
${gc_link_libraries_public}
441437
PRIVATE
438+
${OMR_GC_GLUE_TARGET}
442439
${gc_link_libraries_private}
443440
)
444441
set_target_properties(omrgc omrgc_hookgen omrgc_tracegen PROPERTIES FOLDER gc)
445442

446443
if(OMR_MIXED_REFERENCES_MODE STREQUAL "static")
447444
target_compile_definitions(omrgc PUBLIC -DOMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES=1)
448445

446+
omr_assert(
447+
TEST OMR_GC_GLUE_FULL_TARGET
448+
MESSAGE "OMR_GC_GLUE_TARGET must be set."
449+
)
450+
449451
omr_add_library(omrgc_full STATIC
450452
${omrgc_sources}
451453
)
@@ -531,13 +533,14 @@ if(OMR_MIXED_REFERENCES_MODE STREQUAL "static")
531533
PUBLIC
532534
${gc_include_public}
533535
INTERFACE
534-
${gc_include_interface}
536+
$<TARGET_PROPERTY:${OMR_GC_GLUE_FULL_TARGET},INTERFACE_INCLUDE_DIRECTORIES>
535537
)
536538

537539
target_link_libraries(omrgc_full
538540
PUBLIC
539541
${gc_link_libraries_public}
540542
PRIVATE
543+
${OMR_GC_GLUE_FULL_TARGET}
541544
${gc_link_libraries_private}
542545
)
543546
set_target_properties(omrgc_full omrgc_hookgen omrgc_tracegen PROPERTIES FOLDER gc)

0 commit comments

Comments
 (0)