diff --git a/Directory.Build.props b/Directory.Build.props index 719838f0a0d..7f5b362cb34 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ $(MSBuildThisFileDirectory) true net9.0 - $(DotNetBuildFromSource) + $(DotNetBuildSourceOnly) - + $(NetCurrent) diff --git a/Directory.Build.targets b/Directory.Build.targets index df0677f7673..c43425cc369 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -26,7 +26,7 @@ When .NET gets built from source, make the SDK aware there are bootstrap packages for Microsoft.NETCore.App.Runtime. and Microsoft.NETCore.App.Crossgen2.. --> - + %(RuntimePackRuntimeIdentifiers);$(NETCoreSdkRuntimeIdentifier) diff --git a/FSharpBuild.Directory.Build.props b/FSharpBuild.Directory.Build.props index b2b9ae303cb..148d9c95116 100644 --- a/FSharpBuild.Directory.Build.props +++ b/FSharpBuild.Directory.Build.props @@ -73,8 +73,8 @@ false - - + + false diff --git a/eng/Build.ps1 b/eng/Build.ps1 index a6bda85ef6b..6305083d0df 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -292,6 +292,8 @@ function BuildSolution([string] $solutionName, $nopack) { # Do not set the property to true explicitly, since that would override value projects might set. $suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" } + $sourceBuildArgs = if ($sourceBuild) { "/p:DotNetBuildSourceOnly=true /p:DotNetBuildRepo=true" } else { "" } + $BUILDING_USING_DOTNET_ORIG = $env:BUILDING_USING_DOTNET $env:BUILDING_USING_DOTNET="false" @@ -314,10 +316,10 @@ function BuildSolution([string] $solutionName, $nopack) { /p:QuietRestore=$quietRestore ` /p:QuietRestoreBinaryLog=$binaryLog ` /p:TestTargetFrameworks=$testTargetFrameworks ` - /p:DotNetBuildFromSource=$sourceBuild ` /p:CompressAllMetadata=$CompressAllMetadata ` /p:BuildNoRealsig=$buildnorealsig ` /v:$verbosity ` + $sourceBuildArgs ` $suppressExtensionDeployment ` @properties diff --git a/eng/SourceBuild.props b/eng/DotNetBuild.props similarity index 87% rename from eng/SourceBuild.props rename to eng/DotNetBuild.props index c1759d53260..c7bc688ba3e 100644 --- a/eng/SourceBuild.props +++ b/eng/DotNetBuild.props @@ -13,7 +13,7 @@ --> + Condition="'$(DotNetBuildSourceOnly)' == 'true'"> $(InnerBuildArgs) /p:Projects="$(InnerSourceBuildRepoRoot)\Microsoft.FSharp.Compiler.sln" @@ -26,7 +26,7 @@ + Condition="'$(DotNetBuildSourceOnly)' == 'true'"> --tfm $(SourceBuildBootstrapTfm) @@ -41,9 +41,9 @@ -bl enables the binlogs for the tools and Proto builds, which make debugging failures here easier --> + EnvironmentVariables="@(InnerBuildEnv)" /> diff --git a/eng/build.sh b/eng/build.sh index 8544de1e72e..90260cbfa4f 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -241,6 +241,11 @@ function BuildSolution { if [[ "$UNAME" == "Darwin" ]]; then enable_analyzers=false fi + + local source_build_args="" + if [[ "$source_build" == true ]]; then + source_build_args="/p:DotNetBuildRepo=true /p:DotNetBuildSourceOnly=true" + fi # NuGet often exceeds the limit of open files on Mac and Linux # https://github.com/NuGet/Home/issues/2163 @@ -274,7 +279,7 @@ function BuildSolution { fi BuildMessage="Error building tools" - local args=" publish $repo_root/proto.proj $blrestore $bltools /p:Configuration=Proto /p:ArcadeBuildFromSource=$source_build $properties" + local args=" publish $repo_root/proto.proj $blrestore $bltools /p:Configuration=Proto $source_build_args $properties" echo $args "$DOTNET_INSTALL_DIR/dotnet" $args #$args || exit $? fi @@ -296,8 +301,8 @@ function BuildSolution { /p:ContinuousIntegrationBuild=$ci \ /p:QuietRestore=$quiet_restore \ /p:QuietRestoreBinaryLog="$binary_log" \ - /p:ArcadeBuildFromSource=$source_build \ /p:BuildNoRealsig=$buildnorealsig \ + $source_build_args \ $properties fi } diff --git a/eng/test-determinism.ps1 b/eng/test-determinism.ps1 index fcb5495f434..8056de2b371 100644 --- a/eng/test-determinism.ps1 +++ b/eng/test-determinism.ps1 @@ -78,7 +78,7 @@ function Run-Build([string]$rootDir, [string]$increment) { /p:ContinuousIntegrationBuild=false ` /p:OfficialBuildId="" ` /p:QuietRestore=false ` - /p:DotNetBuildFromSource=false ` + /p:DotNetBuildSourceOnly=false ` /p:Deterministic=true ` /p:DebugDeterminism=true ` /p:Features="debug-determinism" ` diff --git a/proto.proj b/proto.proj index 2d07b389fa6..eb0814976ea 100644 --- a/proto.proj +++ b/proto.proj @@ -4,8 +4,10 @@ Bootstrap - - + + diff --git a/setup/Directory.Build.props b/setup/Directory.Build.props index cca2c04ebcf..47bbe960ea3 100644 --- a/setup/Directory.Build.props +++ b/setup/Directory.Build.props @@ -12,7 +12,7 @@ $(ArtifactsDir)\VSSetup.obj\$(Configuration)\$(MSBuildProjectName) $(SetupRootFolder)..\artifacts\VSSetup\$(Configuration) $(SetupRootFolder)..\artifacts\VSSetup\$(Configuration)\Insertion - true + true Neutral diff --git a/setup/Swix/Directory.Build.targets b/setup/Swix/Directory.Build.targets index 5e826e8da63..85048309295 100644 --- a/setup/Swix/Directory.Build.targets +++ b/setup/Swix/Directory.Build.targets @@ -15,7 +15,7 @@ + Condition="'$(DotNetBuildSourceOnly)' != 'true'"> diff --git a/src/fsc/fscAnyCpuProject/fscAnyCpu.fsproj b/src/fsc/fscAnyCpuProject/fscAnyCpu.fsproj index 3fac5305cae..a813df67d88 100644 --- a/src/fsc/fscAnyCpuProject/fscAnyCpu.fsproj +++ b/src/fsc/fscAnyCpuProject/fscAnyCpu.fsproj @@ -5,7 +5,7 @@ net472 anycpu - true + true diff --git a/src/fsc/fscArm64Project/fscArm64.fsproj b/src/fsc/fscArm64Project/fscArm64.fsproj index c7c42ca1adf..bcc20db5d6a 100644 --- a/src/fsc/fscArm64Project/fscArm64.fsproj +++ b/src/fsc/fscArm64Project/fscArm64.fsproj @@ -5,7 +5,7 @@ net472 arm64 - true + true diff --git a/src/fsi/fsiAnyCpuProject/fsiAnyCpu.fsproj b/src/fsi/fsiAnyCpuProject/fsiAnyCpu.fsproj index f11e2783e44..ae7238e556a 100644 --- a/src/fsi/fsiAnyCpuProject/fsiAnyCpu.fsproj +++ b/src/fsi/fsiAnyCpuProject/fsiAnyCpu.fsproj @@ -5,7 +5,7 @@ net472 anycpu - true + true $(DefineConstants);FSI_SHADOW_COPY_REFERENCES;FSI_SERVER diff --git a/src/fsi/fsiArm64Project/fsiArm64.fsproj b/src/fsi/fsiArm64Project/fsiArm64.fsproj index 07e19f49d5e..acb66346e8a 100644 --- a/src/fsi/fsiArm64Project/fsiArm64.fsproj +++ b/src/fsi/fsiArm64Project/fsiArm64.fsproj @@ -5,7 +5,7 @@ net472 arm64 - true + true $(DefineConstants);FSI_SHADOW_COPY_REFERENCES;FSI_SERVER diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 06697bc35ed..80708062652 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -3,7 +3,7 @@ - true + true portable diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index f7e63b79621..96265fdd24b 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -10,7 +10,7 @@ true xunit true - true + true false false $(OtherFlags) --warnon:1182 diff --git a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj index 8f69b337c5a..3bf2d528a4f 100644 --- a/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj +++ b/tests/FSharp.Compiler.Private.Scripting.UnitTests/FSharp.Compiler.Private.Scripting.UnitTests.fsproj @@ -7,7 +7,7 @@ Library true xunit - true + true $(NoWarn);44 diff --git a/vsintegration/Directory.Build.props b/vsintegration/Directory.Build.props index 3506c3888d2..5a203ce69e2 100644 --- a/vsintegration/Directory.Build.props +++ b/vsintegration/Directory.Build.props @@ -4,7 +4,7 @@ net472 v4.7.2 true - true + true Neutral true diff --git a/vsintegration/tests/MockTypeProviders/Directory.Build.props b/vsintegration/tests/MockTypeProviders/Directory.Build.props index e97fa719a30..3a1978537b7 100644 --- a/vsintegration/tests/MockTypeProviders/Directory.Build.props +++ b/vsintegration/tests/MockTypeProviders/Directory.Build.props @@ -5,7 +5,7 @@ false - true + true