Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public string SdkVersion {
get; set;
}

[Output]
public bool IsXcode8 {
get; set;
}

#endregion Outputs

public override bool Execute ()
Expand All @@ -60,6 +65,8 @@ public override bool Execute ()
EnsureXamarinSdkRoot ();
EnsureSdkPath ();

IsXcode8 = AppleSdkSettings.XcodeVersion.Major >= 8;

return !Log.HasLoggedErrors;
}

Expand Down
13 changes: 11 additions & 2 deletions msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,21 @@ Copyright (C) 2014 Xamarin. All rights reserved.
<Target Name="_ForgeMetal" Condition="'$(_CanOutputAppBundle)' == 'true' And '@(_SmeltedMetal)' != ''" DependsOnTargets="_SmeltMetal"
Inputs="@(_SmeltedMetal)" Outputs="$(IntermediateOutputPath)metal\default.metal-ar">
<ArTool
Condition="'$(IsMacEnabled)' == 'true'"
Condition="'$(IsMacEnabled)' == 'true' and '$(_IsXcode8)' == 'false'"
SessionId="$(BuildSessionId)"
Items="@(_SmeltedMetal)"
Archive="$(IntermediateOutputPath)metal\default.metal-ar">
</ArTool>

<CreateItem Include="$(IntermediateOutputPath)metal\default.metal-ar">
<!-- If !Xcode8 -->
<CreateItem Include="$(IntermediateOutputPath)metal\default.metal-ar"
Condition="'$(_IsXcode8)' == 'false'">
<Output TaskParameter="Include" ItemName="_ForgedMetal" />
</CreateItem>

<!-- Else -->
<CreateItem Include="@(_SmeltedMetal)"
Condition="'$(_IsXcode8)' == 'true'">
<Output TaskParameter="Include" ItemName="_ForgedMetal" />
</CreateItem>
</Target>
Expand Down Expand Up @@ -447,6 +455,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
<Output TaskParameter="SdkBinPath" PropertyName="_SdkBinPath" />
<Output TaskParameter="SdkDevPath" PropertyName="_SdkDevPath" />
<Output TaskParameter="SdkUsrPath" PropertyName="_SdkUsrPath" />
<Output TaskParameter="IsXcode8" PropertyName="_IsXcode8" />
</DetectSdkLocations>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public bool SdkIsSimulator {
get; set;
}

[Output]
public bool IsXcode8 {
get; set;
}

#endregion Outputs

public PlatformFramework Framework {
Expand All @@ -92,6 +97,8 @@ public override bool Execute ()

SdkIsSimulator = (architectures & (TargetArchitecture.i386 | TargetArchitecture.x86_64)) != 0;

IsXcode8 = AppleSdkSettings.XcodeVersion.Major >= 8;

EnsureAppleSdkRoot ();
EnsureXamarinSdkRoot ();
switch (Framework) {
Expand Down
13 changes: 11 additions & 2 deletions msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,20 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
Inputs="@(_SmeltedMetal)" Outputs="$(DeviceSpeficicIntermediateOutputPath)metal\default.metal-ar">
<ArTool
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
Condition="'$(IsMacEnabled)' == 'true' and '$(_IsXcode8)' == 'false'"
Items="@(_SmeltedMetal)"
Archive="$(DeviceSpecificIntermediateOutputPath)metal\default.metal-ar">
</ArTool>

<CreateItem Include="$(DeviceSpecificIntermediateOutputPath)metal\default.metal-ar">
<!-- If !Xcode8 -->
<CreateItem Include="$(DeviceSpecificIntermediateOutputPath)metal\default.metal-ar"
Condition="'$(_IsXcode8)' == 'false'">
<Output TaskParameter="Include" ItemName="_ForgedMetal" />
</CreateItem>

<!-- Else -->
<CreateItem Include="@(_SmeltedMetal)"
Condition="'$(_IsXcode8)' == 'true'">
<Output TaskParameter="Include" ItemName="_ForgedMetal" />
</CreateItem>
</Target>
Expand Down Expand Up @@ -559,6 +567,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
<Output TaskParameter="SdkUsrPath" PropertyName="_SdkUsrPath" />
<Output TaskParameter="SdkPlatform" PropertyName="_SdkPlatform" />
<Output TaskParameter="SdkIsSimulator" PropertyName="_SdkIsSimulator" />
<Output TaskParameter="IsXcode8" PropertyName="_IsXcode8" />
</DetectSdkLocations>
</Target>

Expand Down