crossgen.sh improvements - #1504
Conversation
Aside from waisting time, we were hitting cases where we'd try to crossgen the IL version of System.Private.CoreLib.dll when the ni already exists (as we ship an already ngen'd image in the nupkg we consume) and doing so was causing crossgen to fail.
If NUGET_PACKAGES is set, restore packages to that folder instead of into the packages folder in the source tree.
| __outname="${__file/.dll/.ni.dll}" | ||
| __outname="${__outname/.exe/.ni.exe}" | ||
| echo "$__file -> $__outname" | ||
| if [[ ($__file == *.dll && -e ${__file/.dll/.ni.dll}) || ($__file == *.exe && -e ${__file/.exe/.ni.exe}) ]]; then |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| __toolsDir=$__scriptpath/../Tools | ||
| __dotnet=$__toolsDir/dotnetcli/dotnet | ||
| __packagesDir=$__scriptpath/../packages | ||
| __packagesDir="${NUGET_PACKAGES:-${__scriptpath}/../packages}" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@weshaggard I added an explicit check to not crossgen System.Private.Corelib.dll. I also added a commit that makes it possible to specify CommitHash and VersionSeedDate properties explicitly instead of always shelling out to |
| <LatestDateCommandExitCode>0</LatestDateCommandExitCode> | ||
| </PropertyGroup> | ||
|
|
||
|
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
b05c67b to
fbbd0f3
Compare
This will allow us to set these values explicitly when we are not building a git repository.
fbbd0f3 to
92e10cb
Compare
This PR has two changes:
NUGET_PACKAGESis set in the environment, respect that variable as the location to restore packages to.I'd like some sort of knob to allow me to restore packages to a shared location as part of the build from source work, and
NUGET_PACKAGESseemed like the obvious choice, since the tooling understands that by default.