Skip to content

Commit bd6abc9

Browse files
authored
Merge pull request #32255 from gottesmm/pr-2609ae44ac52a6348d4c38cff38c2b1c7e1583ca
[build-script] Add support for specifying that a product is a non-darwin only product.
2 parents 51fce88 + 450b005 commit bd6abc9

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

utils/swift_build_support/swift_build_support/products/foundation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ def get_dependencies(cls):
4646
swift.Swift,
4747
lldb.LLDB,
4848
libdispatch.LibDispatch]
49+
50+
@classmethod
51+
def is_nondarwin_only_build_product(cls):
52+
return True

utils/swift_build_support/swift_build_support/products/libdispatch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def product_source_name(cls):
3636
"""
3737
return "swift-corelibs-libdispatch"
3838

39+
@classmethod
40+
def is_nondarwin_only_build_product(cls):
41+
return True
42+
3943
@classmethod
4044
def get_dependencies(cls):
4145
return [cmark.CMark,

utils/swift_build_support/swift_build_support/products/libicu.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def product_source_name(cls):
3333
"""
3434
return "icu"
3535

36+
@classmethod
37+
def is_nondarwin_only_build_product(cls):
38+
return True
39+
3640
@classmethod
3741
def get_dependencies(cls):
3842
return [cmark.CMark,

utils/swift_build_support/swift_build_support/products/product.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ def is_swiftpm_unified_build_product(cls):
6666
"""
6767
return False
6868

69+
@classmethod
70+
def is_nondarwin_only_build_product(cls):
71+
"""Returns true if this target should be skipped in darwin builds when
72+
inferring dependencies.
73+
"""
74+
return False
75+
6976
@classmethod
7077
def get_dependencies(cls):
7178
"""Return a list of products that this product depends upon"""

utils/swift_build_support/swift_build_support/products/xctest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ def get_dependencies(cls):
4848
lldb.LLDB,
4949
libdispatch.LibDispatch,
5050
foundation.Foundation]
51+
52+
@classmethod
53+
def is_nondarwin_only_build_product(cls):
54+
return True

0 commit comments

Comments
 (0)