From c7d2686251c7484e247d87f14b3d0bba2d30444e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Fri, 31 Jan 2020 17:29:47 +0000 Subject: [PATCH] fixed problems with configuring projects on Windows --- scripts/choose_projects.py | 3 +++ scripts/llvm-dependencies.yaml | 15 +++++++++++++-- scripts/run_cmake.ps1 | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/scripts/choose_projects.py b/scripts/choose_projects.py index 9492773..9d7804d 100755 --- a/scripts/choose_projects.py +++ b/scripts/choose_projects.py @@ -43,6 +43,7 @@ class ChooseProjects: self.llvm_dir = llvm_dir self.usages = dict() # type: Dict[str,List[str]] self.all_projects = [] # type: List[str] + self.excluded_projects = set() # type: Set[str] self._load_config() @@ -54,6 +55,7 @@ class ChooseProjects: for used in used_list: self.usages.setdefault(used,[]).append(user) self.all_projects = config['allprojects'] + self.excluded_projects = set(config['excludedProjects']) def run(self): llvm_dir = os.path.abspath(os.path.expanduser(args.llvmdir)) @@ -70,6 +72,7 @@ class ChooseProjects: return 0 affected_projects = self.get_affected_projects(changed_projects) + affected_projects = affected_projects - self.excluded_projects print(';'.join(sorted(affected_projects))) return 0 diff --git a/scripts/llvm-dependencies.yaml b/scripts/llvm-dependencies.yaml index 737539d..1fd5e3f 100644 --- a/scripts/llvm-dependencies.yaml +++ b/scripts/llvm-dependencies.yaml @@ -27,13 +27,18 @@ dependencies: - llvm llgo: - llvm + - clang mlir: - llvm - openmp: [] + openmp: + - clang parallel-libs: [] polly: - llvm pstl: [] + debuginfo-tests: + - clang + - lld # List of all projects in the LLVM monorepository. This list is taken from # llvm/CMakeLists.txt in "set(LLVM_ALL_PROJECTS ..." @@ -56,4 +61,10 @@ allprojects: - parallel-libs - polly - pstl - - llvm \ No newline at end of file + - llvm + +# projects excluded from automatic configuration as they could not be built +excludedProjects: +# no working with Visual Studio Compiler on Windows + - lldb + - llgo diff --git a/scripts/run_cmake.ps1 b/scripts/run_cmake.ps1 index 7540dc6..d153c00 100644 --- a/scripts/run_cmake.ps1 +++ b/scripts/run_cmake.ps1 @@ -25,6 +25,11 @@ 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 + $LLVM_ENABLE_PROJECTS = $LLVM_ENABLE_PROJECTS.replace("`n","").replace("`r","") + if ($LLVM_ENABLE_PROJECTS -eq "") { + Write-Error "Error detecting the affected projects." + exit 1 + } } else { $LLVM_ENABLE_PROJECTS=$projects } @@ -40,6 +45,7 @@ Push-Location build Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 # call CMake +$ErrorActionPreference="Continue" Invoke-Call -ScriptBlock { cmake ..\llvm -G Ninja -DCMAKE_BUILD_TYPE=Release ` -D LLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS}" `