2018-11-08 01:51:56 +00:00
|
|
|
set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
|
|
|
|
|
2022-11-24 14:34:41 +00:00
|
|
|
# reset platform variables (e.g. cmake 3.25 sets LINUX=1)
|
|
|
|
unset(LINUX)
|
|
|
|
unset(FREEBSD)
|
|
|
|
unset(ILLUMOS)
|
|
|
|
unset(ANDROID)
|
|
|
|
unset(TIZEN)
|
|
|
|
|
2018-11-08 01:51:56 +00:00
|
|
|
set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
|
2020-04-02 12:54:52 +00:00
|
|
|
if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
|
|
|
|
set(CMAKE_SYSTEM_NAME FreeBSD)
|
2021-12-28 14:23:49 +00:00
|
|
|
set(FREEBSD 1)
|
2020-06-11 17:47:07 +00:00
|
|
|
elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc)
|
|
|
|
set(CMAKE_SYSTEM_NAME SunOS)
|
|
|
|
set(ILLUMOS 1)
|
2022-08-11 12:40:33 +00:00
|
|
|
elseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h)
|
|
|
|
set(CMAKE_SYSTEM_NAME Haiku)
|
2020-04-02 12:54:52 +00:00
|
|
|
else()
|
|
|
|
set(CMAKE_SYSTEM_NAME Linux)
|
2021-12-28 14:23:49 +00:00
|
|
|
set(LINUX 1)
|
2020-04-02 12:54:52 +00:00
|
|
|
endif()
|
2018-11-08 01:51:56 +00:00
|
|
|
set(CMAKE_SYSTEM_VERSION 1)
|
|
|
|
|
2021-12-28 14:23:49 +00:00
|
|
|
if(EXISTS ${CROSS_ROOTFS}/etc/tizen-release)
|
|
|
|
set(TIZEN 1)
|
|
|
|
elseif(EXISTS ${CROSS_ROOTFS}/android_platform)
|
|
|
|
set(ANDROID 1)
|
|
|
|
endif()
|
|
|
|
|
2022-07-29 12:36:00 +00:00
|
|
|
if(TARGET_ARCH_NAME STREQUAL "arm")
|
2018-11-08 01:51:56 +00:00
|
|
|
set(CMAKE_SYSTEM_PROCESSOR armv7l)
|
2020-08-18 16:55:04 +00:00
|
|
|
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf)
|
|
|
|
set(TOOLCHAIN "armv7-alpine-linux-musleabihf")
|
|
|
|
elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf)
|
2018-11-08 01:51:56 +00:00
|
|
|
set(TOOLCHAIN "armv6-alpine-linux-musleabihf")
|
|
|
|
else()
|
|
|
|
set(TOOLCHAIN "arm-linux-gnueabihf")
|
|
|
|
endif()
|
2021-12-28 14:23:49 +00:00
|
|
|
if(TIZEN)
|
2021-12-24 14:09:22 +00:00
|
|
|
set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0")
|
|
|
|
endif()
|
2018-11-08 01:51:56 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
|
|
|
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)
|
|
|
|
set(TOOLCHAIN "aarch64-alpine-linux-musl")
|
2022-07-15 18:56:08 +00:00
|
|
|
elseif(LINUX)
|
2018-11-08 01:51:56 +00:00
|
|
|
set(TOOLCHAIN "aarch64-linux-gnu")
|
2022-07-15 18:56:08 +00:00
|
|
|
if(TIZEN)
|
|
|
|
set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0")
|
|
|
|
endif()
|
|
|
|
elseif(FREEBSD)
|
|
|
|
set(triple "aarch64-unknown-freebsd12")
|
2020-07-08 13:11:11 +00:00
|
|
|
endif()
|
2022-07-29 12:36:00 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "armel")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR armv7l)
|
|
|
|
set(TOOLCHAIN "arm-linux-gnueabi")
|
|
|
|
if(TIZEN)
|
|
|
|
set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0")
|
|
|
|
endif()
|
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "armv6")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR armv6l)
|
|
|
|
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf)
|
|
|
|
set(TOOLCHAIN "armv6-alpine-linux-musleabihf")
|
|
|
|
else()
|
|
|
|
set(TOOLCHAIN "arm-linux-gnueabihf")
|
|
|
|
endif()
|
2022-02-11 16:15:13 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR ppc64le)
|
|
|
|
set(TOOLCHAIN "powerpc64le-linux-gnu")
|
2022-07-29 12:36:00 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "riscv64")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR riscv64)
|
|
|
|
set(TOOLCHAIN "riscv64-linux-gnu")
|
2020-10-29 12:58:51 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR s390x)
|
|
|
|
set(TOOLCHAIN "s390x-linux-gnu")
|
2022-07-15 18:56:08 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "x64")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
|
|
|
if(LINUX)
|
|
|
|
set(TOOLCHAIN "x86_64-linux-gnu")
|
|
|
|
if(TIZEN)
|
|
|
|
set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0")
|
|
|
|
endif()
|
|
|
|
elseif(FREEBSD)
|
|
|
|
set(triple "x86_64-unknown-freebsd12")
|
|
|
|
elseif(ILLUMOS)
|
|
|
|
set(TOOLCHAIN "x86_64-illumos")
|
2022-08-11 12:40:33 +00:00
|
|
|
elseif(HAIKU)
|
|
|
|
set(TOOLCHAIN "x64_64-unknown-haiku")
|
2022-07-15 18:56:08 +00:00
|
|
|
endif()
|
2022-07-29 12:36:00 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR i686)
|
|
|
|
set(TOOLCHAIN "i686-linux-gnu")
|
|
|
|
if(TIZEN)
|
|
|
|
set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0")
|
|
|
|
endif()
|
2018-11-08 01:51:56 +00:00
|
|
|
else()
|
2022-07-29 12:36:00 +00:00
|
|
|
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!")
|
2018-11-08 01:51:56 +00:00
|
|
|
endif()
|
|
|
|
|
2019-11-08 23:46:49 +00:00
|
|
|
if(DEFINED ENV{TOOLCHAIN})
|
|
|
|
set(TOOLCHAIN $ENV{TOOLCHAIN})
|
|
|
|
endif()
|
|
|
|
|
2018-11-08 01:51:56 +00:00
|
|
|
# Specify include paths
|
2021-12-28 14:23:49 +00:00
|
|
|
if(TIZEN)
|
2021-12-24 14:09:22 +00:00
|
|
|
if(TARGET_ARCH_NAME STREQUAL "arm")
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf)
|
|
|
|
endif()
|
2020-07-08 13:11:11 +00:00
|
|
|
if(TARGET_ARCH_NAME STREQUAL "armel")
|
2018-11-08 01:51:56 +00:00
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi)
|
|
|
|
endif()
|
2020-07-08 13:11:11 +00:00
|
|
|
if(TARGET_ARCH_NAME STREQUAL "arm64")
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu)
|
|
|
|
endif()
|
Update dependencies from https://github.com/dotnet/arcade build 20220316.1
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22157.6 -> To Version 7.0.0-beta.22166.1
Dependency coherency updates
VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.Build,Microsoft.SourceBuild.Intermediate.source-build,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.3.22151.6 -> To Version 7.0.0-preview.3.22158.1 (parent: Microsoft.NET.Sdk
2022-03-17 12:33:02 +00:00
|
|
|
if(TARGET_ARCH_NAME STREQUAL "x86")
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu)
|
|
|
|
endif()
|
2018-11-08 01:51:56 +00:00
|
|
|
endif()
|
|
|
|
|
2021-12-28 14:23:49 +00:00
|
|
|
if(ANDROID)
|
2020-03-08 12:38:05 +00:00
|
|
|
if(TARGET_ARCH_NAME STREQUAL "arm")
|
|
|
|
set(ANDROID_ABI armeabi-v7a)
|
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
|
|
|
set(ANDROID_ABI arm64-v8a)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# extract platform number required by the NDK's toolchain
|
2021-12-28 14:23:49 +00:00
|
|
|
file(READ "${CROSS_ROOTFS}/android_platform" RID_FILE_CONTENTS)
|
|
|
|
string(REPLACE "RID=" "" ANDROID_RID "${RID_FILE_CONTENTS}")
|
|
|
|
string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "${ANDROID_RID}")
|
2020-03-08 12:38:05 +00:00
|
|
|
|
|
|
|
set(ANDROID_TOOLCHAIN clang)
|
|
|
|
set(FEATURE_EVENT_TRACE 0) # disable event trace as there is no lttng-ust package in termux repository
|
|
|
|
set(CMAKE_SYSTEM_LIBRARY_PATH "${CROSS_ROOTFS}/usr/lib")
|
|
|
|
set(CMAKE_SYSTEM_INCLUDE_PATH "${CROSS_ROOTFS}/usr/include")
|
|
|
|
|
|
|
|
# include official NDK toolchain script
|
|
|
|
include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake)
|
2021-12-28 14:23:49 +00:00
|
|
|
elseif(FREEBSD)
|
2020-04-02 12:54:52 +00:00
|
|
|
# we cross-compile by instructing clang
|
|
|
|
set(CMAKE_C_COMPILER_TARGET ${triple})
|
|
|
|
set(CMAKE_CXX_COMPILER_TARGET ${triple})
|
|
|
|
set(CMAKE_ASM_COMPILER_TARGET ${triple})
|
|
|
|
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
2021-09-14 13:05:57 +00:00
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
|
|
|
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld")
|
2020-06-11 17:47:07 +00:00
|
|
|
elseif(ILLUMOS)
|
|
|
|
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
|
|
|
|
|
|
|
include_directories(SYSTEM ${CROSS_ROOTFS}/include)
|
|
|
|
|
|
|
|
set(TOOLSET_PREFIX ${TOOLCHAIN}-)
|
|
|
|
function(locate_toolchain_exec exec var)
|
|
|
|
string(TOUPPER ${exec} EXEC_UPPERCASE)
|
|
|
|
if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "")
|
|
|
|
set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_program(EXEC_LOCATION_${exec}
|
|
|
|
NAMES
|
|
|
|
"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
|
|
|
|
"${TOOLSET_PREFIX}${exec}")
|
|
|
|
|
|
|
|
if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND")
|
|
|
|
message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.")
|
|
|
|
endif()
|
|
|
|
set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}")
|
|
|
|
|
|
|
|
locate_toolchain_exec(gcc CMAKE_C_COMPILER)
|
|
|
|
locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp")
|
|
|
|
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp")
|
2022-08-11 12:40:33 +00:00
|
|
|
elseif(HAIKU)
|
|
|
|
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
|
|
|
|
|
|
|
set(TOOLSET_PREFIX ${TOOLCHAIN}-)
|
|
|
|
function(locate_toolchain_exec exec var)
|
|
|
|
string(TOUPPER ${exec} EXEC_UPPERCASE)
|
|
|
|
if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "")
|
|
|
|
set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(SEARCH_PATH "${CROSS_ROOTFS}/generated/cross-tools-x86_64/bin")
|
|
|
|
|
|
|
|
find_program(EXEC_LOCATION_${exec}
|
|
|
|
PATHS ${SEARCH_PATH}
|
|
|
|
NAMES
|
|
|
|
"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
|
|
|
|
"${TOOLSET_PREFIX}${exec}")
|
|
|
|
|
|
|
|
if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND")
|
|
|
|
message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.")
|
|
|
|
endif()
|
|
|
|
set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}")
|
|
|
|
|
|
|
|
locate_toolchain_exec(gcc CMAKE_C_COMPILER)
|
|
|
|
locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp")
|
|
|
|
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp")
|
|
|
|
|
|
|
|
# let CMake set up the correct search paths
|
|
|
|
include(Platform/Haiku)
|
2020-03-08 12:38:05 +00:00
|
|
|
else()
|
|
|
|
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
|
|
|
|
|
|
|
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
|
|
|
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
|
|
|
set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
|
|
|
endif()
|
2018-11-08 01:51:56 +00:00
|
|
|
|
|
|
|
# Specify link flags
|
|
|
|
|
2020-07-29 16:57:31 +00:00
|
|
|
function(add_toolchain_linker_flag Flag)
|
|
|
|
set(Config "${ARGV1}")
|
|
|
|
set(CONFIG_SUFFIX "")
|
|
|
|
if (NOT Config STREQUAL "")
|
|
|
|
set(CONFIG_SUFFIX "_${Config}")
|
|
|
|
endif()
|
2021-09-14 13:05:57 +00:00
|
|
|
set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
|
|
|
|
set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
|
2020-07-29 16:57:31 +00:00
|
|
|
endfunction()
|
|
|
|
|
2021-12-28 14:23:49 +00:00
|
|
|
if(LINUX)
|
[master] Update dependencies from dotnet/arcade (#8726)
* Update dependencies from https://github.com/dotnet/arcade build 20200924.4
Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 5.0.0-beta.20471.1 -> To Version 5.0.0-beta.20474.4
Dependency coherency updates
Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks
From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/arcade build 20200928.3
Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 5.0.0-beta.20471.1 -> To Version 5.0.0-beta.20478.3
Dependency coherency updates
Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks
From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/arcade build 20201006.7
Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 5.0.0-beta.20471.1 -> To Version 5.0.0-beta.20506.7
Dependency coherency updates
Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks,Microsoft.SourceLink.GitHub,XliffTasks
From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/arcade build 20201009.12
Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 5.0.0-beta.20471.1 -> To Version 6.0.0-beta.20509.12
Dependency coherency updates
Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks,Microsoft.SourceLink.GitHub,XliffTasks
From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/arcade build 20201020.8
Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 5.0.0-beta.20471.1 -> To Version 6.0.0-beta.20520.8
Dependency coherency updates
Microsoft.SourceLink.GitHub,XliffTasks
From Version 1.1.0-beta-20464-02 -> To Version 1.1.0-beta-20519-02 (parent: Microsoft.DotNet.Arcade.Sdk
* Update FileInfoAssertions.cs
* Update FileInfoAssertions.cs
* Use tasks provided by Microsoft.DotNet.Build.Tasks.Installers when provided.
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
2020-10-23 07:44:02 +00:00
|
|
|
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
|
|
|
|
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}")
|
|
|
|
endif()
|
2020-07-29 16:57:31 +00:00
|
|
|
|
2021-12-28 14:23:49 +00:00
|
|
|
if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
|
|
|
|
if(TIZEN)
|
2020-07-29 16:57:31 +00:00
|
|
|
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
2018-11-08 01:51:56 +00:00
|
|
|
endif()
|
2020-07-08 13:11:11 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
2021-12-28 14:23:49 +00:00
|
|
|
if(TIZEN)
|
2020-07-29 16:57:31 +00:00
|
|
|
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
|
|
|
|
|
|
|
|
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64")
|
|
|
|
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64")
|
|
|
|
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
|
2020-07-08 13:11:11 +00:00
|
|
|
endif()
|
2018-11-08 01:51:56 +00:00
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
2020-07-29 16:57:31 +00:00
|
|
|
add_toolchain_linker_flag(-m32)
|
Update dependencies from https://github.com/dotnet/arcade build 20220316.1
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22157.6 -> To Version 7.0.0-beta.22166.1
Dependency coherency updates
VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.Build,Microsoft.SourceBuild.Intermediate.source-build,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.3.22151.6 -> To Version 7.0.0-preview.3.22158.1 (parent: Microsoft.NET.Sdk
2022-03-17 12:33:02 +00:00
|
|
|
|
|
|
|
if(TIZEN)
|
|
|
|
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
|
|
|
endif()
|
2020-06-11 17:47:07 +00:00
|
|
|
elseif(ILLUMOS)
|
2020-07-29 16:57:31 +00:00
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64")
|
|
|
|
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib")
|
2018-11-08 01:51:56 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Specify compile options
|
|
|
|
|
2022-08-11 12:40:33 +00:00
|
|
|
if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU)
|
2018-11-08 01:51:56 +00:00
|
|
|
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
|
|
|
|
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
|
|
|
|
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
|
|
|
|
add_compile_options(-mthumb)
|
2020-02-11 13:49:59 +00:00
|
|
|
if (NOT DEFINED CLR_ARM_FPU_TYPE)
|
|
|
|
set (CLR_ARM_FPU_TYPE vfpv3)
|
|
|
|
endif (NOT DEFINED CLR_ARM_FPU_TYPE)
|
|
|
|
|
|
|
|
add_compile_options (-mfpu=${CLR_ARM_FPU_TYPE})
|
|
|
|
if (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
|
|
|
|
set (CLR_ARM_FPU_CAPABILITY 0x7)
|
|
|
|
endif (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
|
|
|
|
|
|
|
|
add_definitions (-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY})
|
|
|
|
|
2018-11-08 01:51:56 +00:00
|
|
|
if(TARGET_ARCH_NAME STREQUAL "armel")
|
|
|
|
add_compile_options(-mfloat-abi=softfp)
|
|
|
|
endif()
|
|
|
|
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
|
|
|
add_compile_options(-m32)
|
|
|
|
add_compile_options(-Wno-error=unused-command-line-argument)
|
|
|
|
endif()
|
|
|
|
|
2021-12-28 14:23:49 +00:00
|
|
|
if(TIZEN)
|
Update dependencies from https://github.com/dotnet/arcade build 20220316.1
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22157.6 -> To Version 7.0.0-beta.22166.1
Dependency coherency updates
VS.Redist.Common.NetCore.SharedFramework.x64.7.0,Microsoft.NETCore.App.Ref,VS.Redist.Common.NetCore.TargetingPack.x64.7.0,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.App.Host.win-x64,Microsoft.NETCore.DotNetHostResolver,Microsoft.NETCore.Platforms,Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.Build,Microsoft.SourceBuild.Intermediate.source-build,Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
From Version 7.0.0-preview.3.22151.6 -> To Version 7.0.0-preview.3.22158.1 (parent: Microsoft.NET.Sdk
2022-03-17 12:33:02 +00:00
|
|
|
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64|x86)$")
|
2020-07-08 13:11:11 +00:00
|
|
|
add_compile_options(-Wno-deprecated-declarations) # compile-time option
|
|
|
|
add_compile_options(-D__extern_always_inline=inline) # compile-time option
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-11-08 23:46:49 +00:00
|
|
|
# Set LLDB include and library paths for builds that need lldb.
|
2018-11-08 01:51:56 +00:00
|
|
|
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
|
|
|
|
if(TARGET_ARCH_NAME STREQUAL "x86")
|
|
|
|
set(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}")
|
|
|
|
else() # arm/armel case
|
|
|
|
set(LLVM_CROSS_DIR "$ENV{LLVM_ARM_HOME}")
|
|
|
|
endif()
|
|
|
|
if(LLVM_CROSS_DIR)
|
|
|
|
set(WITH_LLDB_LIBS "${LLVM_CROSS_DIR}/lib/" CACHE STRING "")
|
|
|
|
set(WITH_LLDB_INCLUDES "${LLVM_CROSS_DIR}/include" CACHE STRING "")
|
|
|
|
set(LLDB_H "${WITH_LLDB_INCLUDES}" CACHE STRING "")
|
|
|
|
set(LLDB "${LLVM_CROSS_DIR}/lib/liblldb.so" CACHE STRING "")
|
|
|
|
else()
|
|
|
|
if(TARGET_ARCH_NAME STREQUAL "x86")
|
|
|
|
set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/i386-linux-gnu" CACHE STRING "")
|
|
|
|
set(CHECK_LLVM_DIR "${CROSS_ROOTFS}/usr/lib/llvm-3.8/include")
|
|
|
|
if(EXISTS "${CHECK_LLVM_DIR}" AND IS_DIRECTORY "${CHECK_LLVM_DIR}")
|
|
|
|
set(WITH_LLDB_INCLUDES "${CHECK_LLVM_DIR}")
|
|
|
|
else()
|
|
|
|
set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include")
|
|
|
|
endif()
|
|
|
|
else() # arm/armel case
|
|
|
|
set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}" CACHE STRING "")
|
|
|
|
set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include" CACHE STRING "")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|