diff --git a/src/coreclr/clrfeatures.cmake b/src/coreclr/clrfeatures.cmake index 643835ed1dc316..b3fb6958244594 100644 --- a/src/coreclr/clrfeatures.cmake +++ b/src/coreclr/clrfeatures.cmake @@ -1,3 +1,12 @@ +# riscv64 and loongarch64 do not have a separate CID-only asm stub layer yet. +# Forcing FEATURE_DYNAMIC_CODE_COMPILED on keeps the feature matrix consistent with +# the top-level build and avoids unresolved CID/VSD stub symbols at link time. +if (NOT DEFINED FEATURE_DYNAMIC_CODE_COMPILED) + if (CLR_CMAKE_TARGET_ARCH_RISCV64 OR CLR_CMAKE_TARGET_ARCH_LOONGARCH64) + set(FEATURE_DYNAMIC_CODE_COMPILED 1) + endif() +endif() + if (FEATURE_DYNAMIC_CODE_COMPILED) set(FEATURE_TIERED_COMPILATION 1) set(FEATURE_REJIT 1) diff --git a/src/coreclr/vm/loongarch64/asmconstants.h b/src/coreclr/vm/loongarch64/asmconstants.h index 56628960c1aeae..8a8050b8931a21 100644 --- a/src/coreclr/vm/loongarch64/asmconstants.h +++ b/src/coreclr/vm/loongarch64/asmconstants.h @@ -171,10 +171,12 @@ ASMCONSTANTS_C_ASSERT(SIZEOF__FixupPrecode == sizeof(FixupPrecode)); ASMCONSTANTS_C_ASSERT(MethodDesc_ALIGNMENT_SHIFT == MethodDesc::ALIGNMENT_SHIFT); ASMCONSTANTS_C_ASSERT((1<