Skip to content
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

Source built short stack support #97725

Merged
merged 5 commits into from
Feb 2, 2024
Merged
Changes from 3 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
17 changes: 15 additions & 2 deletions eng/SourceBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,36 @@
<!-- Split e.g. 'fedora.33-x64' into 'fedora.33' and 'x64'. -->
<_targetRidPlatformIndex>$(TargetRid.LastIndexOf('-'))</_targetRidPlatformIndex>
<TargetArch>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetArch>
<TargetOS>$(TargetRid.Substring(0, $(_targetRidPlatformIndex)).TrimStart('-'))</TargetOS>
directhex marked this conversation as resolved.
Show resolved Hide resolved

<_hostRidPlatformIndex>$(_hostRid.LastIndexOf('-'))</_hostRidPlatformIndex>
<_hostArch>$(_hostRid.Substring($(_hostRidPlatformIndex)).TrimStart('-'))</_hostArch>

<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
</PropertyGroup>

<PropertyGroup Label="ShortStacks">
<ShortStack Condition="'$(TargetOS)' == 'wasi'">true</ShortStack>
<ShortStack Condition="'$(TargetOS)' == 'browser'">true</ShortStack>
<ShortStack Condition="'$(TargetOS)' == 'ios'">true</ShortStack>
<ShortStack Condition="'$(TargetOS)' == 'iossimulator'">true</ShortStack>
<ShortStack Condition="'$(TargetOS)' == 'tvos'">true</ShortStack>
<ShortStack Condition="'$(TargetOS)' == 'tvossimulator'">true</ShortStack>
<ShortStack Condition="'$(TargetOS)' == 'maccatalyst'">true</ShortStack>
<ShortStack Condition="'$(TargetOS)' == 'android'">true</ShortStack>
</PropertyGroup>

<Target Name="GetRuntimeSourceBuildCommandConfiguration"
BeforeTargets="GetSourceBuildCommandConfiguration">
<PropertyGroup>
<!-- Properties that control the source-build configuration should be added to the repository and guarded with the DotNetBuildFromSource Condition.
This allows to build the repository using './build.sh <args> /p:DotNetBuildFromSource=true'.
Properties that control flags from source-build, and the expected output for source-build should be added to this file. -->
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)arch $(TargetArch)</InnerBuildArgs>
<InnerBuildArgs Condition=" '$(TargetArch)' != '$(_hostArch)' ">$(InnerBuildArgs) $(FlagParameterPrefix)cross</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)os $(TargetOS)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(TargetArch)' != '$(_hostArch)' and '$(ShortStack)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)cross</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)configuration $(Configuration)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)allconfigurations</InnerBuildArgs>
<InnerBuildArgs Condition="'$(ShortStack)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)allconfigurations</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)verbosity $(LogVerbosity)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg)</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg)</InnerBuildArgs>
Expand Down
Loading