@@ -83,6 +83,25 @@ RuntimeLibrary.darwin.Configs := \
83
83
84
84
IOS_SDK := $(shell xcrun --show-sdk-path -sdk iphoneos 2> /dev/null)
85
85
IOSSIM_SDK := $(shell xcrun --show-sdk-path -sdk iphonesimulator 2> /dev/null)
86
+ TVOS_SDK := $(shell xcrun --show-sdk-path -sdk appletvos 2> /dev/null)
87
+ TVOSSIM_SDK := $(shell xcrun --show-sdk-path -sdk appletvsimulator 2> /dev/null)
88
+ WATCHOS_SDK := $(shell xcrun --show-sdk-path -sdk watchos 2> /dev/null)
89
+ WATCHOSSIM_SDK := $(shell xcrun --show-sdk-path -sdk watchsimulator 2> /dev/null)
90
+
91
+ LinkerSupportedArches = \
92
+ $(shell \
93
+ result=""; \
94
+ for arch in $1; do \
95
+ if $(LD ) -v 2>&1 | grep "configured to support" | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \
96
+ result="$$result$$arch "; \
97
+ fi; \
98
+ done; \
99
+ echo $$result)
100
+
101
+
102
+ RuntimeLibrary.macho_embedded.Configs := \
103
+ hard_static.a hard_pic.a
104
+ ifneq (,$(findstring ARM,$(TARGETS_TO_BUILD ) ) )
86
105
87
106
ifneq ($(IOS_SDK )$(IOSSIM_SDK ) ,)
88
107
RuntimeLibrary.darwin.Configs += ios.a profile_ios.a
@@ -99,9 +118,23 @@ RuntimeLibrary.darwin.Configs += asan_iossim_dynamic.dylib \
99
118
ubsan_iossim_dynamic.dylib
100
119
endif
101
120
102
- RuntimeLibrary.macho_embedded.Configs := \
103
- hard_static.a hard_pic.a
104
- ifneq (,$(findstring ARM,$(TARGETS_TO_BUILD ) ) )
121
+
122
+ ifneq ($(TVOS_SDK )$(TVOSSIM_SDK ) ,)
123
+ RuntimeLibrary.darwin.Configs += tvos.a profile_tvos.a
124
+ endif
125
+
126
+ ifneq ($(TVOS_SDK ) ,)
127
+ RuntimeLibrary.darwin.Configs += cc_kext_tvos.a
128
+ endif
129
+
130
+ ifneq ($(WATCHOS_SDK )$(WATCHOSSIM_SDK ) ,)
131
+ RuntimeLibrary.darwin.Configs += watchos.a profile_watchos.a
132
+ endif
133
+
134
+ ifneq ($(WATCHOS_SDK ) ,)
135
+ RuntimeLibrary.darwin.Configs += cc_kext_watchos.a
136
+ endif
137
+
105
138
RuntimeLibrary.macho_embedded.Configs += \
106
139
soft_static.a soft_pic.a
107
140
endif
0 commit comments