mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fixing powershell.exe lib paths and more thoroughly cleaning the powershell-native directory (#2758)
This commit is contained in:
committed by
Dongbo Wang
parent
20a0ba041c
commit
cac96e5fc9
@@ -120,6 +120,11 @@ function Start-PSBuild {
|
||||
Push-Location $PSScriptRoot
|
||||
try {
|
||||
git clean -fdX
|
||||
# Extra cleaning is required to delete the CMake temporary files.
|
||||
# These are not cleaned when using "X" and cause CMake to retain state, leading to
|
||||
# mis-configured environment issues when switching between x86 and x64 compilation
|
||||
# environments.
|
||||
git clean -fdx .\src\powershell-native
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@ if (BUILD_ONECORE)
|
||||
#
|
||||
# Configure lib directories so that CI picks up onecore.lib
|
||||
#
|
||||
SET (WindowsSdkDir $ENV{WindowsSdkDir})
|
||||
SET (WindowsSDKVersion $ENV{WindowsSDKVersion})
|
||||
SET (WindowsSDKLibBase "${WindowsSdkDir}/Lib/${WindowsSDKVersion}")
|
||||
SET (OneCoreLibBase "$ENV{VCInstallDir}lib/onecore/amd64")
|
||||
if (BUILD_ARCH_AMD64)
|
||||
SET (WindowsSdkDir $ENV{WindowsSdkDir})
|
||||
SET (WindowsSDKVersion $ENV{WindowsSDKVersion})
|
||||
SET (WindowsSDKLibBase "${WindowsSdkDir}/Lib/${WindowsSDKVersion}")
|
||||
SET (OneCoreLibBase "$ENV{VCInstallDir}lib/onecore/amd64")
|
||||
|
||||
SET (LibraryPath)
|
||||
list (APPEND LibraryPath "${OneCoreLibBase}")
|
||||
list (APPEND LibraryPath "${WindowsSDKLibBase}ucrt/${WindowsSDKPlatform}")
|
||||
list (APPEND LibraryPath "${WindowsSDKLibBase}um/${WindowsSDKPlatform}" )
|
||||
link_directories(${LibraryPath})
|
||||
SET (LibraryPath)
|
||||
list (APPEND LibraryPath "${OneCoreLibBase}")
|
||||
list (APPEND LibraryPath "${WindowsSDKLibBase}ucrt/${WindowsSDKPlatform}")
|
||||
list (APPEND LibraryPath "${WindowsSDKLibBase}um/${WindowsSDKPlatform}" )
|
||||
link_directories(${LibraryPath})
|
||||
endif ()
|
||||
|
||||
else ()
|
||||
# Settings to use when creating PowerShell.exe for Windows on full SKUs or downlevel platforms
|
||||
|
||||
Reference in New Issue
Block a user