@@ -146,7 +146,18 @@ SWIFT_SRC_FILES=\
146
146
swift/Wrapper.swift
147
147
148
148
SWIFT_ABS_SRC_FILES = $(SWIFT_SRC_FILES:%=$(abs_srcdir ) /% )
149
- SWIFT_OBJ_FILES = $(SWIFT_SRC_FILES:%.swift=$(abs_builddir ) /%.o )
149
+ SWIFT_OBJ_FILES = $(abs_builddir ) /swift/swift_overlay.o
150
+
151
+ SWIFTC_FLAGS = -Xcc -fmodule-map-file=$(abs_top_srcdir ) /dispatch/module.modulemap -I$(abs_top_srcdir ) -Xcc -fblocks
152
+ if DISPATCH_ENABLE_OPTIMIZATION
153
+ SWIFTC_FLAGS+ =-O
154
+ endif
155
+
156
+ $(abs_builddir ) /swift/swift_overlay.o : $(SWIFT_ABS_SRC_FILES ) $(SWIFTC )
157
+ @rm -f $@
158
+ $(SWIFTC ) -whole-module-optimization -emit-library -c $(SWIFT_ABS_SRC_FILES ) \
159
+ $(SWIFTC_FLAGS ) -module-name Dispatch -module-link-name dispatch \
160
+ -o $@ -emit-module-path $(abs_builddir ) /swift/Dispatch.swiftmodule
150
161
151
162
libdispatch_la_SOURCES+ =swift/DispatchStubs.cc
152
163
EXTRA_libdispatch_la_SOURCES+ =$(SWIFT_SRC_FILES )
@@ -157,38 +168,12 @@ libdispatch_la_LIBADD+=$(SWIFT_OBJ_FILES)
157
168
SWIFT_GEN_FILES = \
158
169
$(abs_builddir ) /swift/Dispatch.swiftmodule \
159
170
$(abs_builddir ) /swift/Dispatch.swiftdoc \
160
- $(SWIFT_OBJ_FILES ) \
161
- $(SWIFT_OBJ_FILES:%=%.d ) \
162
- $(SWIFT_OBJ_FILES:%=%.swiftdeps ) \
163
- $(SWIFT_OBJ_FILES:%=%.~partial.swiftmodule ) \
164
- $(SWIFT_OBJ_FILES:%=%.~partial.swiftdoc ) \
165
- $(SWIFT_OBJ_FILES:%=%.~partial.swiftdeps )
166
-
167
- SWIFTC_FLAGS = -Xcc -fmodule-map-file=$(abs_top_srcdir ) /dispatch/module.modulemap -I$(abs_top_srcdir ) -Xcc -fblocks
168
- if DISPATCH_ENABLE_OPTIMIZATION
169
- SWIFTC_FLAGS+ =-O
170
- endif
171
-
172
- $(abs_builddir ) /swift/% .o : $(abs_srcdir ) /swift/% .swift $(SWIFTC )
173
- @rm -f $@
174
- $(SWIFTC ) -frontend -c $(SWIFT_ABS_SRC_FILES ) -primary-file $< \
175
- $(SWIFTC_FLAGS ) -module-name Dispatch -module-link-name dispatch \
176
- -o $@ -emit-module-path $@ .~partial.swiftmodule \
177
- -emit-module-doc-path $@ .~partial.swiftdoc -emit-dependencies-path $@ .d \
178
- -emit-reference-dependencies-path $@ .swiftdeps \
179
- -module-cache-path $(top_builddir )
180
-
181
- $(abs_builddir ) /swift/Dispatch.swiftmodule : $(SWIFT_ABS_SRC_FILES ) $(SWIFTC )
182
- @rm -f $@
183
- $(SWIFTC ) -frontend -emit-module $(SWIFT_OBJ_FILES:%=%.~partial.swiftmodule ) \
184
- $(SWIFTC_FLAGS ) -module-cache-path $(top_builddir ) -module-link-name dispatch \
185
- -o $@ -emit-module-doc-path $(@:%.swiftmodule=%.swiftdoc )
171
+ $(SWIFT_OBJ_FILES )
186
172
187
173
swiftmoddir =${prefix}/lib/swift/linux/${build_cpu}
188
174
swiftmod_HEADERS =\
189
175
$(abs_builddir ) /swift/Dispatch.swiftmodule \
190
176
$(abs_builddir ) /swift/Dispatch.swiftdoc
191
-
192
177
endif
193
178
194
179
BUILT_SOURCES =$(MIG_SOURCES ) $(DTRACE_SOURCES )
0 commit comments