Skip to content

Commit c9b1071

Browse files
Merge pull request #64428 from AnthonyLatsis/xcode-gen-opt
build-script: Don't build LLVM testing tools when generating Xcode projects
2 parents 6c5ac51 + f94f401 commit c9b1071

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

utils/swift_build_support/swift_build_support/products/llvm.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,18 @@ def build(self, host_target):
230230
build_targets = ['clean']
231231

232232
if self.args.skip_build or not self.args.build_llvm:
233+
# We can't skip the build completely because the standalone
234+
# build of Swift depends on these.
233235
build_targets = ['llvm-tblgen', 'clang-resource-headers',
234236
'intrinsics_gen', 'clang-tablegen-targets']
235-
if not self.args.build_toolchain_only:
237+
238+
# If we are not performing a toolchain-only build or generating
239+
# Xcode projects, then we also want to include the following
240+
# targets for testing purposes.
241+
if (
242+
not self.args.build_toolchain_only
243+
and self.args.cmake_generator != 'Xcode'
244+
):
236245
build_targets.extend([
237246
'FileCheck',
238247
'not',

validation-test/BuildSystem/skip_build_xcode.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
#
1212
# CHECK: --- Building llvm ---
1313
# CHECK: env {{.+}}/cmake --build {{.+}}/Xcode-ReleaseAssert/llvm-macosx-{{.+}} --config Release --target ZERO_CHECK{{$}}
14-
# CHECK-NEXT: env {{.+}}/cmake --build {{.+}}/Xcode-ReleaseAssert/llvm-macosx-{{.+}} --config Release --target ZERO_CHECK -- {{.*}}-target llvm-tblgen -target clang-resource-headers -target intrinsics_gen -target clang-tablegen-targets -target FileCheck -target not -target llvm-nm -target llvm-size{{$}}
14+
# CHECK-NEXT: env {{.+}}/cmake --build {{.+}}/Xcode-ReleaseAssert/llvm-macosx-{{.+}} --config Release --target ZERO_CHECK -- {{.*}}-target llvm-tblgen -target clang-resource-headers -target intrinsics_gen -target clang-tablegen-targets{{$}}

0 commit comments

Comments
 (0)