Invalid CoreCLR directory path in CMakeFile
Hello,
In CMakeList.txt of netcoredbg below code looks to be incorrect,
set(CORECLR_SRC_DIR "${CORECLR_DIR}/src")
What should be the correct path to be set to CORECLR_DIR ?
Do you have some build issues? CORECLR_SRC_DIR takes in account both older coreclr repo (https://github.com/dotnet/coreclr before merge in https://github.com/dotnet/runtime, e.g. .Net Core 3.1), as well as new runtime repo.
yes.. If above repo paths are given, it will throw an error if /dotnet/runtime repo is given and the condition below will fail
# Basic checks for valid paths
if (NOT IS_DIRECTORY "${CORECLR_SRC_DIR}/pal")
message(FATAL_ERROR "Invalid CoreCLR source directory")
endif()
as /dotnet/runtime/pal is invalid here. Pal directory is located at /dotnet/runtime/src/coreclr/pal , Hence I had to pass /dotnet/runtime/src/coreclr directory path.
Hence I think,
The code needs to be changed from set(CORECLR_SRC_DIR "${CORECLR_DIR}/src") to set(CORECLR_SRC_DIR "${CORECLR_DIR}") and Proper path of CORECLR_DIR should be passed as /dotnet/runtime/src/coreclr
Let me know if its proper to provide the fix, i will submit.
The code needs to be changed from set(CORECLR_SRC_DIR "${CORECLR_DIR}/src") to set(CORECLR_SRC_DIR "${CORECLR_DIR}")
In this case you broke build with previous CoreCLR versions. In case you want provide changes, please, make sure it will work for all CoreCLR sources since version 3.1.
Hence I had to pass /dotnet/runtime/src/coreclr directory path.
This is intentional behavior, CORECLR_SRC_DIR variable represents dir of CoreCLR, and runtime repo contains other stuff too. Path to CoreCLR is passed right now to support build with new and old repos. You can propose some change that will support passing dotnet/runtime, but this change should not break build with older repo.
Thanks.
Microsoft is no more using https://github.com/dotnet/coreclr repo. Active development is happening in https://github.com/dotnet/runtime. I Suppose we should be using this going further.
For this time we support build starts from CoreCLR 3.1, since it still used in old, but still supported by Samsung versions of Tizen OS, that don't provide other source packages of CoreCLR for debugger build. This mean, netcoredbg build must support CoreCLR versions 3.1, 6.0, 8.0, ... (usually LTS + current release versions) in order to support all actively supported Tizen OS versions.