Skip to content

Refactor CMake system to allow cross OS DAC compile - #2054

Merged
sdmaclea merged 2 commits into
dotnet:masterfrom
sdmaclea:CMakeCross
Jan 24, 2020
Merged

Refactor CMake system to allow cross OS DAC compile#2054
sdmaclea merged 2 commits into
dotnet:masterfrom
sdmaclea:CMakeCross

Conversation

@sdmaclea

Copy link
Copy Markdown
Contributor

Add CLR_CMAKE_HOST_OS

Add rules to determine which cross OS combinations are valid

Make add_defintions depend on TARGET OS properties

Wherever reasonable make C++ define defintions depend on runtime target
rather than host.

@sdmacleasdmaclea added this to the 5.0 milestone Jan 23, 2020
@sdmacleasdmaclea self-assigned this Jan 23, 2020
@Dotnet-GitSync-BotDotnet-GitSync-Bot added the area-Infrastructure-coreclr Only use for closed issues label Jan 23, 2020
@sdmaclea

Copy link
Copy Markdown
ContributorAuthor

This collided with @am11's #1753. I have fixed the merge conflicts.

@am11

am11 commented Jan 24, 2020

Copy link
Copy Markdown
Member

Currently src/coreclr and src/installer are sharing host definitions via eng/native/configureplatform.cmake. We can make src/libraries/Native/Unix/CMakeLists.txt also depend on it. Then there will be only one file setting CLR_CMAKE_{HOST,TARGET}_PLATFORM_* in the entire repo.

@jkotas

Copy link
Copy Markdown
Member

The build break on musl is likely introduced by these changes. Could you please take a look?

Add CLR_CMAKE_HOST_OS
Add rules to determine which cross OS combinations are valid
Make add_defintions depend on TARGET OS properties
Wherever reasonable make C++ define defintions depend on runtime target
rather than host.
@sdmaclea

Copy link
Copy Markdown
ContributorAuthor

Thanks @jkotas. I found the error. I neglected to set CLR_CMAKE_TARGET_LINUX for alpine and tizen. This disabled /PerfMap support in crossgen and caused the failure.

@sdmaclea
sdmaclea merged commit a0cb673 into dotnet:masterJan 24, 2020
@sdmaclea
sdmaclea deleted the CMakeCross branch January 24, 2020 22:09
@ghostghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Infrastructure-coreclrOnly use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@sdmaclea@am11@jkotas@hoyosjs@Dotnet-GitSync-Bot