Repository navigation
[Xamarin.Android.Build.Tasks] properly support abi delimiters - #3190
Merged
Merged
Conversation
dellis1972
approved these changes
Jun 10, 2019
Contributor
|
Please review the |
Member
Author
|
Due to Looking into it. |
jonathanpeppers
force-pushed
the
bizarro-delimiters
branch
from
June 11, 2019 03:18
338460c to
25d71c9
Compare
jonathanpeppers
commented
Jun 11, 2019
| <AntToolPath Condition=" '$(AntToolPath)' == '' ">$(AntDirectory)\bin</AntToolPath> | ||
| <AndroidSupportedHostJitAbis Condition=" '$(AndroidSupportedHostJitAbis)' == '' ">$(HostOS)</AndroidSupportedHostJitAbis> | ||
| <AndroidSupportedTargetJitAbis Condition=" '$(AndroidSupportedTargetJitAbis)' == '' ">armeabi-v7a:arm64-v8a:x86</AndroidSupportedTargetJitAbis> | ||
| <AndroidSupportedTargetJitAbis Condition=" '$(AndroidSupportedTargetJitAbis)' == '' ">armeabi-v7a:arm64-v8a:x86:x86_64</AndroidSupportedTargetJitAbis> |
Member
Author
There was a problem hiding this comment.
I was getting build errors in the EmbeddedDSOTests about x86_64 stuff missing.
I am a little confused, but it seems bin\BuildDebug\XABuildConfig.cs seems to be the cause:
using System;
using System.Collections.Generic;
namespace Xamarin.Android.Tools
{
static class XABuildConfig
{
public const string SupportedABIs = "armeabi-v7a;arm64-v8a;x86;x86_64";
...There might be something else we should do instead here. Let's see if it fixes the tests on CI?
jonathanpeppers
force-pushed
the
bizarro-delimiters
branch
from
June 11, 2019 16:28
25d71c9 to
64370ec
Compare
Fixes: dotnet#3175 In 6ce33aa, we broke support for `,` and `%3b` as delimiters for `$(AndroidSupportedAbis)`. We did not have a test checking for these cases. Reviewing the code, we had repetition like this throughout our codebase: var abis = SupportedAbis.Split (new char[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries); Instead what we should do, is provide a single task that converts the abis to an MSBuild item group to be used throughout: <SplitProperty Value="$(AndroidSupportedAbis)"> <Output TaskParameter="Output" ItemName="_BuildTargetAbis"/> </SplitProperty> Then we can consume the `@(_BuildTargetAbis)` item group in a simpler way from inside MSBuild tasks: [Required] public string [] SupportedAbis { get; set; } MSBuild can handle translating an item group to a `string[]`. We should use that! Other changes: * Removed some extra log messages in `<Aot/>` and `<MakeBundleNativeCodeExternal/>` * Moved the error checking for `XA0115` in `_CheckSupportedAbis` to happen right after `@(_BuildTargetAbis)` is created. * Added tests for `,` and `%3b` Future work: I'll do similar clean for `$(AndroidStoreUncompressedFileExtensions)` in another PR.
jonathanpeppers
force-pushed
the
bizarro-delimiters
branch
from
June 12, 2019 03:10
64370ec to
4302f23
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #3175
In 6ce33aa, we broke support for
,and%3bas delimiters for$(AndroidSupportedAbis). We did not have a test checking for thesecases.
Reviewing the code, we had repetition like this throughout our
codebase:
Instead what we should do, is provide a single task that converts the
abis to an MSBuild item group to be used throughout:
Then we can consume the
@(_BuildTargetAbis)item group in a simplerway from inside MSBuild tasks:
MSBuild can handle translating an item group to a
string[]. Weshould use that!
Other changes:
<Aot/>and<MakeBundleNativeCodeExternal/>XA0115in_CheckSupportedAbistohappen right after
@(_BuildTargetAbis)is created.,and%3bFuture work:
I'll do similar cleanup for
$(AndroidStoreUncompressedFileExtensions)in another PR.