added flag to select projects
This commit is contained in:
parent
1af59cc965
commit
df79c3c6a6
1 changed files with 18 additions and 1 deletions
|
@ -12,8 +12,25 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory=$false)][string]$projects="default"
|
||||||
|
)
|
||||||
|
|
||||||
. ${PSScriptRoot}\common.ps1
|
. ${PSScriptRoot}\common.ps1
|
||||||
|
|
||||||
|
# set LLVM_ENABLE_PROJECTS to default value
|
||||||
|
# if -DetectProjects is set the projects are detected based on the files
|
||||||
|
# that were modified in the working copy
|
||||||
|
if ($projects -eq "default") {
|
||||||
|
$LLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;lld;libunwind;mlir"
|
||||||
|
} elseif ($projects -eq "detect") {
|
||||||
|
$LLVM_ENABLE_PROJECTS = (git diff | python ${PSScriptRoot}\choose_projects.py . ) | Out-String
|
||||||
|
} else {
|
||||||
|
$LLVM_ENABLE_PROJECTS=$projects
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Output "Setting LLVM_ENABLE_PROJECTS=${LLVM_ENABLE_PROJECTS}"
|
||||||
|
|
||||||
# Delete and re-create build folder
|
# Delete and re-create build folder
|
||||||
Remove-Item build -Recurse -ErrorAction Ignore
|
Remove-Item build -Recurse -ErrorAction Ignore
|
||||||
New-Item -ItemType Directory -Force -Path build | Out-Null
|
New-Item -ItemType Directory -Force -Path build | Out-Null
|
||||||
|
@ -25,7 +42,7 @@ Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
|
||||||
# call CMake
|
# call CMake
|
||||||
Invoke-Call -ScriptBlock {
|
Invoke-Call -ScriptBlock {
|
||||||
cmake ..\llvm -G Ninja -DCMAKE_BUILD_TYPE=Release `
|
cmake ..\llvm -G Ninja -DCMAKE_BUILD_TYPE=Release `
|
||||||
-D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;lld;libunwind;mlir" `
|
-D LLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS}" `
|
||||||
-D LLVM_ENABLE_ASSERTIONS=ON `
|
-D LLVM_ENABLE_ASSERTIONS=ON `
|
||||||
-DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml" `
|
-DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml" `
|
||||||
-D LLVM_ENABLE_DIA_SDK=OFF
|
-D LLVM_ENABLE_DIA_SDK=OFF
|
||||||
|
|
Loading…
Reference in a new issue