-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix libs.tests subset build on tizen arm64 #63128
Conversation
In our cross-build setup, we use different heuristics to identify the target platform first for ourselves, to be then able to set "toolchain file" settings. Sometimes it is a file that is known to exist in platform's sysroot directory pointed by `ROOTFS_DIR` (FreeBSD and illumos), and for Tizen and Android it is `__DistroRid` environment variable which is used for detection. This environment variable is set only during the non-portable build. In NativeExport.csproj, we call toolchain.cmake via `output-toolchain-info.cmake` using `Exec` task to prepare native compiler and linker arguments for DNNE project. It is invoked in script mode where cmake engine does not initialize its built-in modules. For the handful of build-in modules that we use in `toolchain.cmake`, we have custom macros in `output-toolchain-info.cmake`. Tizen build was broken because a) `__DistroRid` was not propagated in the `Exec` task, b) we were missing custom macro for `include_directories`. This delta addresses the issue a) by unifying how different platforms are detected in toolchain file and forgoes reliance of `__DistroRid` which is an archiac concept when non-portable builds were the only option, and issue b) by defining `include_directores` macro.
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsIn our cross-build setup, we use different heuristics to identify the In NativeExport.csproj, we call toolchain.cmake via Tizen build was broken because a) This delta addresses the issue a) by unifying how different platforms Fixes #63122
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked for me too, thanks!
Merged as 4c83c3b . github did not close the PR for some reason. |
In our cross-build setup, we use different heuristics to identify the target platform first for ourselves, to be then able to set "toolchain file" settings. Sometimes it is a file that is known to exist in platform's sysroot directory pointed by `ROOTFS_DIR` (FreeBSD and illumos), and for Tizen and Android it is `__DistroRid` environment variable which is used for detection. This environment variable is set only during the non-portable build. In NativeExport.csproj, we call toolchain.cmake via `output-toolchain-info.cmake` using `Exec` task to prepare native compiler and linker arguments for DNNE project. It is invoked in script mode where cmake engine does not initialize its built-in modules. For the handful of build-in modules that we use in `toolchain.cmake`, we have custom macros in `output-toolchain-info.cmake`. Tizen build was broken because a) `__DistroRid` was not propagated in the `Exec` task, b) we were missing custom macro for `include_directories`. This delta addresses the issue a) by unifying how different platforms are detected in toolchain file and forgoes reliance of `__DistroRid` which is an archiac concept when non-portable builds were the only option, and issue b) by defining `include_directores` macro.
In our cross-build setup, we use different heuristics to identify the
target platform first for ourselves, to be then able to set "toolchain
file" settings (
CMAKE_SYSTEM_NAME
,CMAKE_SYSTEM_PROCESSOR
etc.).Sometimes it is a file that is known to exist in platform's
sysroot directory pointed by
ROOTFS_DIR
(FreeBSD and illumos),and for Tizen and Android it is
__DistroRid
environment variable whichis used for detection. This environment variable is correctly set only during the
non-portable build of Tizen (for portable builds, it is set to
linux-x64
).In NativeExport.csproj, we call toolchain.cmake via
output-toolchain-info.cmake
usingExec
task to prepare nativecompiler and linker arguments for DNNE project. It is invoked in script
mode where cmake engine does not initialize its built-in modules. For
the handful of build-in modules that we use in
toolchain.cmake
, wehave custom macros in
output-toolchain-info.cmake
.Tizen build was broken because a)
__DistroRid
was not propagated inthe
Exec
task, b) we were missing custom macro forinclude_directories
.This delta addresses the issue a) by unifying how different platforms
are detected in toolchain file and forgoes reliance of
__DistroRid
which is an archiac concept when non-portable builds were the only
option, and issue b) by defining
include_directories
macro.Fixes #63122