Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Param(
[switch]$bootstrap,
[switch]$useBoostrap,
[switch]$clrinterpreter,
[ValidateSet("true","false")][string]$dynamiccodecompiled,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)

Expand Down Expand Up @@ -59,6 +60,9 @@ function Get-Help() {
Write-Host " [Default: Builds the entire repo.]"
Write-Host " -usemonoruntime Product a .NET runtime with Mono as the underlying runtime."
Write-Host " -clrinterpreter Enables CoreCLR interpreter for Release builds of targets where it is a Debug only feature."
Write-Host " -dynamiccodecompiled Enable or disable dynamic code compilation support. Accepts true or false."
Write-Host " Also enables the interpreter when dynamic code compilation is disabled."
Write-Host " [Default: true for most platforms, false for ios/tvos/browser/wasi]"
Write-Host " -verbosity (-v) MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]."
Write-Host " [Default: Minimal]"
Write-Host " --useBootstrap Use the results of building the bootstrap subset to build published tools on the target machine."
Expand Down Expand Up @@ -345,10 +349,24 @@ foreach ($argument in $PSBoundParameters.Keys)
"fsanitize" { $arguments += " /p:EnableNativeSanitizers=$($PSBoundParameters[$argument])"}
"useBootstrap" { $arguments += " /p:UseBootstrap=$($PSBoundParameters[$argument])" }
"clrinterpreter" { $arguments += " /p:FeatureInterpreter=true" }
"dynamiccodecompiled" {}
default { $arguments += " /p:$argument=$($PSBoundParameters[$argument])" }
}
}

# Default dynamiccodecompiled based on target OS if not explicitly set
if (-not $dynamiccodecompiled) {
if ($os -eq "maccatalyst" -or $os -eq "ios" -or $os -eq "iossimulator" -or $os -eq "tvos" -or $os -eq "tvossimulator" -or $os -eq "browser" -or $os -eq "wasi") {
$dynamiccodecompiled = "false"
} else {
$dynamiccodecompiled = "true"
}
}
$arguments += " /p:FeatureDynamicCodeCompiled=$dynamiccodecompiled"
if ($dynamiccodecompiled -eq "false") {
$arguments += " /p:FeatureInterpreter=true"
}

if ($env:TreatWarningsAsErrors -eq 'false') {
$arguments += " -warnAsError `$false"
}
Expand Down
34 changes: 34 additions & 0 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ usage()
echo " [Default: Builds the entire repo.]"
echo " --usemonoruntime Product a .NET runtime with Mono as the underlying runtime."
echo " --clrinterpreter Enables CoreCLR interpreter for Release builds of targets where it is a Debug only feature."
echo " --dynamiccodecompiled Enable or disable dynamic code compilation support. Accepts true or false."
echo " Also enables the interpreter when dynamic code compilation is disabled."
echo " [Default: true for most platforms, false for ios/tvos/browser/wasi]"
echo " --verbosity (-v) MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]."
echo " [Default: Minimal]"
echo " --use-bootstrap Use the results of building the bootstrap subset to build published tools on the target machine."
Expand Down Expand Up @@ -161,6 +164,7 @@ crossBuild=0
portableBuild=1
bootstrap=0
bootstrapConfig='Debug'
dynamiccodecompiled=""

source $scriptroot/common/native/init-os-and-arch.sh

Expand Down Expand Up @@ -390,6 +394,20 @@ while [[ $# -gt 0 ]]; do
shift 1
;;

-dynamiccodecompiled)
if [ -z ${2+x} ]; then
echo "No value for dynamiccodecompiled is supplied. See help (--help) for supported values." 1>&2
exit 1
fi
dynamiccodecompiled="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
if [[ "$dynamiccodecompiled" != "true" && "$dynamiccodecompiled" != "false" ]]; then
echo "Unsupported value '$2' for dynamiccodecompiled."
echo "The allowed values are true and false."
exit 1
fi
shift 2
;;

-librariesconfiguration|-lc)
if [ -z ${2+x} ]; then
echo "No libraries configuration supplied. See help (--help) for supported libraries configurations." 1>&2
Expand Down Expand Up @@ -573,6 +591,22 @@ if [[ "$os" == "wasi" ]]; then
arch=wasm
fi

# Default dynamiccodecompiled based on target OS if not explicitly set
if [[ -z "$dynamiccodecompiled" ]]; then
case "$os" in
maccatalyst|ios|iossimulator|tvos|tvossimulator|browser|wasi)
dynamiccodecompiled="false"
;;
*)
dynamiccodecompiled="true"
;;
esac
fi
arguments+=("/p:FeatureDynamicCodeCompiled=$dynamiccodecompiled")
if [[ "$dynamiccodecompiled" == "false" ]]; then
arguments+=("/p:FeatureInterpreter=true")
fi

if [[ "${TreatWarningsAsErrors:-}" == "false" ]]; then
arguments+=("-warnAsError" "false")
fi
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/clr.featuredefines.props
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<DefineConstants Condition="'$(FeatureXplatEventSource)' == 'true'">$(DefineConstants);FEATURE_EVENTSOURCE_XPLAT</DefineConstants>
<DefineConstants Condition="'$(FeatureTypeEquivalence)' == 'true'">$(DefineConstants);FEATURE_TYPEEQUIVALENCE</DefineConstants>
<DefineConstants Condition="'$(FeatureInterpreter)' == 'true'">$(DefineConstants);FEATURE_INTERPRETER</DefineConstants>
<DefineConstants Condition="'$(FeatureDynamicCodeCompiled)' == 'true'">$(DefineConstants);FEATURE_DYNAMIC_CODE_COMPILED</DefineConstants>
<DefineConstants Condition="'$(FeaturePortableEntryPoints)' == 'true'">$(DefineConstants);FEATURE_PORTABLE_ENTRYPOINTS</DefineConstants>
<DefineConstants Condition="'$(FeaturePortableHelpers)' == 'true'">$(DefineConstants);FEATURE_PORTABLE_HELPERS</DefineConstants>
<DefineConstants Condition="'$(FeatureWasmManagedThreads)' == 'true'">$(DefineConstants);FEATURE_WASM_MANAGED_THREADS</DefineConstants>
Expand Down
7 changes: 3 additions & 4 deletions src/coreclr/clrdefinitions.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
include(${CMAKE_CURRENT_LIST_DIR}/clrfeatures.cmake)

if(FEATURE_JIT)
add_compile_definitions(FEATURE_JIT)
endif(FEATURE_JIT)

add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>:DACCESS_COMPILE>)

if (CLR_CMAKE_TARGET_UNIX)
Expand Down Expand Up @@ -109,6 +105,9 @@ if (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_
endif (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))

add_compile_definitions($<${FEATURE_INTERPRETER}:FEATURE_INTERPRETER>)
if (FEATURE_DYNAMIC_CODE_COMPILED)
add_compile_definitions(FEATURE_DYNAMIC_CODE_COMPILED)
endif()
if (FEATURE_PORTABLE_ENTRYPOINTS)
add_compile_definitions(FEATURE_PORTABLE_ENTRYPOINTS)
endif()
Expand Down
19 changes: 9 additions & 10 deletions src/coreclr/clrfeatures.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if (NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_MACCATALYST)
if (FEATURE_DYNAMIC_CODE_COMPILED)
set(FEATURE_TIERED_COMPILATION 1)
set(FEATURE_REJIT 1)
set(FEATURE_JIT 1)
endif()

if (CLR_CMAKE_TARGET_ARCH_WASM OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS OR CLR_CMAKE_TARGET_MACCATALYST)
Expand Down Expand Up @@ -36,15 +35,15 @@ if(NOT DEFINED FEATURE_DBGIPC)
endif()
endif(NOT DEFINED FEATURE_DBGIPC)

if(CLR_CMAKE_TARGET_ARCH_WASM)
# FEATURE_INTERPRETER is already enabled by default
set(FEATURE_PORTABLE_ENTRYPOINTS 1)
set(FEATURE_PORTABLE_HELPERS 1)
endif(CLR_CMAKE_TARGET_ARCH_WASM)

if(NOT DEFINED FEATURE_INTERPRETER)
if(CLR_CMAKE_TARGET_ANDROID)
set(FEATURE_INTERPRETER 0)
elseif(CLR_CMAKE_TARGET_ARCH_WASM)
set(FEATURE_INTERPRETER 1)
set(FEATURE_PORTABLE_ENTRYPOINTS 1)
set(FEATURE_PORTABLE_HELPERS 1)
elseif(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS OR CLR_CMAKE_TARGET_MACCATALYST)
set(FEATURE_INTERPRETER 1)
else()
if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_RISCV64)
set(FEATURE_INTERPRETER $<IF:$<CONFIG:Debug,Checked>,1,0>)
Expand Down Expand Up @@ -86,11 +85,11 @@ if (CLR_CMAKE_TARGET_WIN32)
set(FEATURE_TYPEEQUIVALENCE 1)
endif(CLR_CMAKE_TARGET_WIN32)

if (CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
if (NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT FEATURE_DYNAMIC_CODE_COMPILED)
set(FEATURE_STUBPRECODE_DYNAMIC_HELPERS 1)
endif()

if (CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS OR CLR_CMAKE_TARGET_ARCH_WASM)
if (NOT FEATURE_DYNAMIC_CODE_COMPILED)
set(FEATURE_CORECLR_CACHED_INTERFACE_DISPATCH 1)
set(FEATURE_CORECLR_VIRTUAL_STUB_DISPATCH 0)
else()
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/debug/daccess/daccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5804,7 +5804,7 @@ ClrDataAccess::RawGetMethodName(
EX_END_CATCH
}
}
#ifdef FEATURE_JIT
#ifdef FEATURE_DYNAMIC_CODE_COMPILED
else
if (pStubManager == JumpStubStubManager::g_pManager)
{
Expand All @@ -5826,7 +5826,7 @@ ClrDataAccess::RawGetMethodName(
return hr;
}
}
#endif // FEATURE_JIT
#endif // FEATURE_DYNAMIC_CODE_COMPILED

LPCWSTR wszStubManagerName = pStubManager->GetStubManagerName(TO_TADDR(address));
_ASSERTE(wszStubManagerName != NULL);
Expand Down
12 changes: 7 additions & 5 deletions src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,19 @@ if(FEATURE_EVENT_TRACE)
endif(FEATURE_EVENT_TRACE)

if (FEATURE_STATICALLY_LINKED)
if (FEATURE_JIT)
if (FEATURE_DYNAMIC_CODE_COMPILED)
set(CLRJIT_STATIC clrjit_static gcinfo)
endif(FEATURE_JIT)
endif(FEATURE_DYNAMIC_CODE_COMPILED)
if (FEATURE_INTERPRETER)
set(CLRINTERPRETER_STATIC clrinterpreter_objects dn-containers gcinfo)
endif(FEATURE_INTERPRETER)
endif(FEATURE_STATICALLY_LINKED)

if(FEATURE_JIT)
if(FEATURE_DYNAMIC_CODE_COMPILED)
set(CORECLR_STATIC_CLRJIT_STATIC clrjit_static)
endif(FEATURE_JIT)
elseif(FEATURE_INTERPRETER)
set(CORECLR_STATIC_CLRINTERPRETER_STATIC clrinterpreter_objects dn-containers gcinfo)
endif()

if(CLR_CMAKE_HOST_ARCH_WASM)
set(CEE_WKS_STATIC cee_wks)
Expand All @@ -178,7 +180,7 @@ if(TARGET coreclr)
${FOUNDATION})
endif()

target_link_libraries(coreclr_static PUBLIC ${CORECLR_LIBRARIES} ${CORECLR_STATIC_CLRJIT_STATIC} ${CLRINTERPRETER_STATIC} cee_wks_core ${CEE_WKS_STATIC} ${FOUNDATION})
target_link_libraries(coreclr_static PUBLIC ${CORECLR_LIBRARIES} ${CORECLR_STATIC_CLRJIT_STATIC} ${CORECLR_STATIC_CLRINTERPRETER_STATIC} cee_wks_core ${CEE_WKS_STATIC} ${FOUNDATION})
target_compile_definitions(coreclr_static PUBLIC CORECLR_EMBEDDED)

if (CLR_CMAKE_HOST_ANDROID)
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/inc/clrconfigvalues.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ CONFIG_DWORD_INFO(INTERNAL_FastGCCheckStack, W("FastGCCheckStack"), 0, "")
CONFIG_DWORD_INFO(INTERNAL_FastGCStress, W("FastGCStress"), 0, "Reduce the number of GCs done by enabling GCStress")
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_GCBreakOnOOM, W("GCBreakOnOOM"), 0, "Does a DebugBreak at the soonest time we detect an OOM")
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConcurrent, W("gcConcurrent"), (DWORD)-1, "Enables/Disables concurrent GC")
#if defined(TARGET_IOS) || defined(TARGET_TVOS) || defined(TARGET_MACCATALYST)
#if !defined(FEATURE_DYNAMIC_CODE_COMPILED)
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_UseGCWriteBarrierCopy, W("UseGCWriteBarrierCopy"), 0, "Use a copy of the write barrier for the GC. This is somewhat faster and for optimizations where the barrier is mutated as the program runs. Setting this to 0 removes scenarios where the write barrier is ever mutable.")
#else
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_UseGCWriteBarrierCopy, W("UseGCWriteBarrierCopy"), 1, "Use a copy of the write barrier for the GC. This is somewhat faster and for optimizations where the barrier is mutated as the program runs. Setting this to 0 removes scenarios where the write barrier is ever mutable.")
#endif // defined(TARGET_IOS) || defined(TARGET_TVOS) || defined(TARGET_MACCATALYST)
#endif // !defined(FEATURE_DYNAMIC_CODE_COMPILED)

#ifdef FEATURE_CONSERVATIVE_GC
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConservative, W("gcConservative"), 0, "Enables/Disables conservative GC")
Expand Down Expand Up @@ -555,11 +555,11 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_VirtualCallStubLogging, W("VirtualCallStubLogg
CONFIG_DWORD_INFO(INTERNAL_VirtualCallStubMissCount, W("VirtualCallStubMissCount"), 100, "Used only when STUB_LOGGING is defined, which by default is not.")
CONFIG_DWORD_INFO(INTERNAL_VirtualCallStubResetCacheCounter, W("VirtualCallStubResetCacheCounter"), 0, "Used only when STUB_LOGGING is defined, which by default is not.")
CONFIG_DWORD_INFO(INTERNAL_VirtualCallStubResetCacheIncr, W("VirtualCallStubResetCacheIncr"), 0, "Used only when STUB_LOGGING is defined, which by default is not.")
#if defined(TARGET_IOS) || defined(TARGET_TVOS) || defined(TARGET_MACCATALYST)
#if !defined(FEATURE_DYNAMIC_CODE_COMPILED)
CONFIG_DWORD_INFO(INTERNAL_UseCachedInterfaceDispatch, W("UseCachedInterfaceDispatch"), 1, "If cached interface dispatch is compiled in, use that instead of virtual stub dispatch")
#else
CONFIG_DWORD_INFO(INTERNAL_UseCachedInterfaceDispatch, W("UseCachedInterfaceDispatch"), 0, "If cached interface dispatch is compiled in, use that instead of virtual stub dispatch")
#endif // defined(TARGET_IOS) || defined(TARGET_TVOS) || defined(TARGET_MACCATALYST)
#endif // !defined(FEATURE_DYNAMIC_CODE_COMPILED)
///
/// Watson
///
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/inc/dacvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ DEFINE_DACVAR(VMHELPDEF *, dac__hlpDynamicFuncTable, ::hlpDynamicFuncTable)
DEFINE_DACVAR(PTR_StubManager, StubManager__g_pFirstManager, StubManager::g_pFirstManager)
DEFINE_DACVAR(PTR_PrecodeStubManager, PrecodeStubManager__g_pManager, PrecodeStubManager::g_pManager)
DEFINE_DACVAR(PTR_StubLinkStubManager, StubLinkStubManager__g_pManager, StubLinkStubManager::g_pManager)
#ifdef FEATURE_JIT
#ifdef FEATURE_DYNAMIC_CODE_COMPILED
DEFINE_DACVAR(PTR_JumpStubStubManager, JumpStubStubManager__g_pManager, JumpStubStubManager::g_pManager)
#endif // FEATURE_JIT
#endif // FEATURE_DYNAMIC_CODE_COMPILED
DEFINE_DACVAR(PTR_RangeSectionStubManager, RangeSectionStubManager__g_pManager, RangeSectionStubManager::g_pManager)
DEFINE_DACVAR(PTR_VirtualCallStubManagerManager, VirtualCallStubManagerManager__g_pManager, VirtualCallStubManagerManager::g_pManager)
#ifdef FEATURE_TIERED_COMPILATION
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
#endif // FEATURE_VIRTUAL_STUB_DISPATCH

// FEATURE_PORTABLE_SHUFFLE_THUNKS depends on CPUSTUBLINKER that is de-facto JIT
#if defined(FEATURE_JIT) && !defined(TARGET_X86)
#if defined(FEATURE_DYNAMIC_CODE_COMPILED) && !defined(TARGET_X86)
#define FEATURE_PORTABLE_SHUFFLE_THUNKS
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/inc/vptr_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ VPTR_CLASS(StubLinkStubManager)
VPTR_CLASS(ThePreStubManager)
VPTR_CLASS(VirtualCallStubManager)
VPTR_CLASS(VirtualCallStubManagerManager)
#ifdef FEATURE_JIT
#ifdef FEATURE_DYNAMIC_CODE_COMPILED
VPTR_CLASS(JumpStubStubManager)
#endif // FEATURE_JIT
#endif // FEATURE_DYNAMIC_CODE_COMPILED
VPTR_CLASS(RangeSectionStubManager)
VPTR_CLASS(ILStubManager)
VPTR_CLASS(InteropDispatchStubManager)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/interpreter/eeinterp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ CorJitResult CILInterp::compileMethod(ICorJitInfo* compHnd,
break;
}

#if !defined(FEATURE_JIT)
#if !defined(FEATURE_DYNAMIC_CODE_COMPILED)
// interpret everything when we do not have a JIT
doInterpret = true;
#else
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<_CoreClrBuildArg Condition="'$(HasCdacBuildTool)' == 'true'" Include="-cmakeargs &quot;-DCDAC_BUILD_TOOL_BINARY_PATH=$(RuntimeBinDir)cdac-build-tool\cdac-build-tool.dll&quot;" />
<_CoreClrBuildArg Condition="'$(FeatureXplatEventSource)' == 'false'" Include="-cmakeargs &quot;-DFEATURE_EVENTSOURCE_XPLAT=0&quot;" />
<_CoreClrBuildArg Condition="'$(FeatureInterpreter)' == 'true'" Include="-cmakeargs &quot;-DFEATURE_INTERPRETER=1&quot;" />
<_CoreClrBuildArg Condition="'$(FeatureDynamicCodeCompiled)' == 'true'" Include="-cmakeargs &quot;-DFEATURE_DYNAMIC_CODE_COMPILED=1&quot;" />
</ItemGroup>

<ItemGroup Condition="'$(CxxStandardLibrary)' != ''">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public bool TargetAllowsRuntimeCodeGeneration
{
get
{
#if FEATURE_DYNAMIC_CODE_COMPILED
if (Target.OperatingSystem is TargetOS.iOS or TargetOS.iOSSimulator or TargetOS.MacCatalyst or TargetOS.tvOS or TargetOS.tvOSSimulator)
{
return false;
Expand All @@ -115,6 +116,9 @@ public bool TargetAllowsRuntimeCodeGeneration
}

return true;
#else
return false;
#endif
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>READYTORUN;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(FeatureDynamicCodeCompiled)' == 'true'">$(DefineConstants);FEATURE_DYNAMIC_CODE_COMPILED</DefineConstants>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<Platforms>x64;x86;arm;arm64</Platforms>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/utilcode/executableallocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ void* ExecutableAllocator::Commit(void* pStart, size_t size, bool isExecutable)
}
else
{
#if defined(TARGET_IOS) || defined(TARGET_TVOS) || defined(TARGET_MACCATALYST)
#if !defined(FEATURE_DYNAMIC_CODE_COMPILED)
return ClrVirtualAlloc(pStart, size, MEM_COMMIT, PAGE_READWRITE);
#else
return ClrVirtualAlloc(pStart, size, MEM_COMMIT, isExecutable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE);
Expand Down Expand Up @@ -714,7 +714,7 @@ void* ExecutableAllocator::ReserveWithinRange(size_t size, const void* loAddress
else
{
DWORD allocationType = MEM_RESERVE;
#if defined(HOST_UNIX) && !defined(TARGET_IOS) && !defined(TARGET_TVOS) && !defined(TARGET_MACCATALYST)
#if defined(HOST_UNIX) && defined(FEATURE_DYNAMIC_CODE_COMPILED)
// Tell PAL to use the executable memory allocator to satisfy this request for virtual memory.
// This will allow us to place JIT'ed code close to the coreclr library
// and thus improve performance by avoiding jump stubs in managed code.
Expand Down Expand Up @@ -804,7 +804,7 @@ void* ExecutableAllocator::Reserve(size_t size)
else
{
DWORD allocationType = MEM_RESERVE;
#if defined(HOST_UNIX) && !defined(TARGET_IOS) && !defined(TARGET_TVOS) && !defined(TARGET_MACCATALYST)
#if defined(HOST_UNIX) && defined(FEATURE_DYNAMIC_CODE_COMPILED)
// Tell PAL to use the executable memory allocator to satisfy this request for virtual memory.
// This will allow us to place JIT'ed code close to the coreclr library
// and thus improve performance by avoiding jump stubs in managed code.
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/appdomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,9 @@ void SystemDomain::Attach()
#ifndef FEATURE_PORTABLE_ENTRYPOINTS
PrecodeStubManager::Init();
#endif // !FEATURE_PORTABLE_ENTRYPOINTS
#ifdef FEATURE_JIT
#ifdef FEATURE_DYNAMIC_CODE_COMPILED
JumpStubStubManager::Init();
#endif // FEATURE_JIT
#endif // FEATURE_DYNAMIC_CODE_COMPILED
RangeSectionStubManager::Init();
ILStubManager::Init();
InteropDispatchStubManager::Init();
Expand Down
Loading
Loading