Skip to content

Commit 8263fa1

Browse files
committed
Merge pull request #266 from swiftix/wip-prespecializations-module
Add required flags for using the new SwiftOnoneSupport library
2 parents 4979968 + 5be5be5 commit 8263fa1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
foundation.CFLAGS = '-DDEPLOYMENT_TARGET_MACOSX '
2424
foundation.LDFLAGS = '-licucore -twolevel_namespace -Wl,-alias_list,CoreFoundation/Base.subproj/DarwinSymbolAliases -sectcreate __UNICODE __csbitmaps CoreFoundation/CharacterSets/CFCharacterSetBitmaps.bitmap -sectcreate __UNICODE __properties CoreFoundation/CharacterSets/CFUniCharPropertyDatabase.data -sectcreate __UNICODE __data CoreFoundation/CharacterSets/CFUnicodeData-L.mapping -segprot __UNICODE r r '
2525

26+
if Configuration.current.build_mode == Configuration.Debug:
27+
foundation.LDFLAGS += ' -lswiftSwiftOnoneSupport '
28+
2629
# For now, we do not distinguish between public and private headers (they are all private to Foundation)
2730
# These are really part of CF, which should ultimately be a separate target
2831
foundation.ROOT_HEADERS_FOLDER_PATH = "${PREFIX}/lib/swift"
@@ -68,6 +71,15 @@
6871
'-I'+Configuration.current.variables["LIBDISPATCH_BUILD_DIR"]+'/tests' # for include of dispatch/private.h in CF
6972
])
7073

74+
if Configuration.current.build_mode == Configuration.Release:
75+
foundation.LDFLAGS += ' -lswiftSwiftOnoneSupport '
76+
# In the future, remove the LDFLAGS line above and enable
77+
# the optimizations. But currently, it results in a segmentation
78+
# fault on one of the tests.
79+
#swift_cflags += [
80+
# '-O'
81+
#]
82+
7183
foundation.SWIFTCFLAGS = " ".join(swift_cflags)
7284

7385
foundation.LDFLAGS += '-lpthread -ldl -lm -lswiftCore -lxml2 '

0 commit comments

Comments
 (0)