@@ -196,11 +196,7 @@ def _compute_projects_to_build(
196196 projects_to_test : Set [str ], runtimes : Set [str ]
197197) -> Set [str ]:
198198 projects_with_deps = _add_dependencies (projects_to_test , runtimes )
199- # CIR is used as a pseudo-project in this script. We detect modifications
200- # to clang's CIR-specific subdirectories and add CIR as a modified project
201- # if a file in these directories is modified, but we need to remove it
202- # explicitly here.
203- return projects_with_deps - {"CIR" }
199+ return projects_with_deps
204200
205201
206202def _compute_project_check_targets (projects_to_test : Set [str ]) -> Set [str ]:
@@ -261,9 +257,8 @@ def _get_modified_projects(modified_files: list[str]) -> Set[str]:
261257 or path_parts [:3 ] == ("clang" , "test" , "CIR" )
262258 or path_parts [:4 ] == ("clang" , "include" , "clang" , "CIR" )
263259 ):
264- modified_projects .add ("clang" )
265260 modified_projects .add ("CIR" )
266- continue
261+ # Fall through to add clang.
267262 modified_projects .add (pathlib .Path (modified_file ).parts [0 ])
268263 return modified_projects
269264
@@ -285,10 +280,11 @@ def get_env_variables(modified_files: list[str], platform: str) -> Set[str]:
285280 runtimes_to_test_needs_reconfig
286281 )
287282
288- # Check if both clang and mlir are in projects_to_build to enable CIR
289- enable_cir = (
290- "ON" if "clang" in projects_to_build and "mlir" in projects_to_build else "OFF"
291- )
283+ # CIR is used as a pseudo-project in this script. It is built as part of the
284+ # clang build, but it requires an explicit option to enable. We set that
285+ # option here, and remove it from the projects_to_build list.
286+ enable_cir = "ON" if "CIR" in projects_to_build else "OFF"
287+ projects_to_build .discard ("CIR" )
292288
293289 # We use a semicolon to separate the projects/runtimes as they get passed
294290 # to the CMake invocation and thus we need to use the CMake list separator
0 commit comments