Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

make build on ARM easier #34607

Merged
merged 4 commits into from Jan 16, 2019
Merged

make build on ARM easier #34607

merged 4 commits into from Jan 16, 2019

Conversation

wfurt
Copy link
Member

@wfurt wfurt commented Jan 15, 2019

This change default ArchGroup to build host CPU Architecture like we default TargetOs to OS.
With this, one does not need to use special parameters over and over again when rebuild one assembly or running unit tests. (on arm host directly)
This should have no impact on official builds.

This change also disables SourceLink on ARM CPU family.

@wfurt wfurt added this to the 3.0 milestone Jan 15, 2019
@wfurt wfurt self-assigned this Jan 15, 2019
@wfurt wfurt requested review from ericstj and safern January 15, 2019 22:20
@wfurt wfurt requested a review from eerhardt January 15, 2019 23:25
@@ -285,6 +288,8 @@

<!-- Rhel 6 and FreeBSD doesn't support the source control git package so disable SourceLink -->
<EnableSourceLink Condition="$(RuntimeOS.StartsWith('rhel.6')) OR '$(_runtimeOSFamily)' == 'FreeBSD'">false</EnableSourceLink>
<EnableSourceLink Condition="'$(HostArch)' == 'Arm' OR '$(HostArch)' == 'Arm64'">false</EnableSourceLink>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does sourcelink need a bug to enable this scenario?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why use HostArch here instead of ArchGroup? You already mapped HostArch to ArchGroup

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because SourceLink ( microsoft.build.tasks.git) drags in native dependencies. When you for example run on x64 and ArchGroup=arm everything works ok. But let say you target x64 and you build on arm, that it fails. So it is not about what you building for but what you building on.
As far as SourceLink: It may be nice if SourceLink supports ARM but there are other issues preventing full build on ARM @eerhardt . Asking them for ARM may complicate their build quite a bit and so far I did not find any limitations of setting this to false. For now, my primary use case is building single assembly using msbuild command and running tests.
Rest os my tasks, I can do easily elsewhere.

(and I added note about sourcelink on arm)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened dotnet/sourcelink#231 to have the discussion if enabling source link on ARM makes sense.

@wfurt wfurt merged commit 0fc160a into dotnet:master Jan 16, 2019
@wfurt wfurt deleted the build_on_arm branch June 15, 2020 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants