@@ -35,7 +35,7 @@ def generate_products(self):
35
35
variables += key + "=" + val
36
36
variables += "\n "
37
37
verbose_flags = """
38
- VERBOSE_FLAGS = """
38
+ VERBOSE_FLAGS = """
39
39
if Configuration .current .verbose :
40
40
verbose_flags += "-v"
41
41
verbose_flags += "\n "
@@ -80,7 +80,7 @@ def generate_products(self):
80
80
BINUTILS_VERSION = 4.8
81
81
TARGET_LDSYSROOT =
82
82
"""
83
-
83
+
84
84
if Configuration .current .bootstrap_directory is not None :
85
85
base_flags += """
86
86
BOOTSTRAP_DIR = """ + Configuration .current .bootstrap_directory .relative () + """/common
@@ -101,7 +101,7 @@ def generate_products(self):
101
101
if Configuration .current .bootstrap_directory is not None :
102
102
c_flags += """ -I${BOOTSTRAP_DIR}/usr/include -I${BOOTSTRAP_DIR}/usr/local/include """
103
103
c_flags += """ -I${TARGET_BOOTSTRAP_DIR}/usr/include -I${TARGET_BOOTSTRAP_DIR}/usr/local/include """
104
-
104
+
105
105
c_flags += Configuration .current .extra_c_flags
106
106
107
107
swift_flags = "\n TARGET_SWIFTCFLAGS = -I${SDKROOT}/lib/swift/" + Configuration .current .target .swift_sdk_name + " -Xcc -fblocks -resource-dir ${SDKROOT}/lib/swift "
@@ -120,9 +120,10 @@ def generate_products(self):
120
120
swift_flags += "-O "
121
121
122
122
swift_flags += Configuration .current .extra_swift_flags
123
-
123
+
124
124
swift_flags += """
125
- TARGET_SWIFTEXE_FLAGS = -I${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + """ -L${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + """ """
125
+ TARGET_SWIFTEXE_FLAGS = -I${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + """ -L${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + \
126
+ """ -L${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + """/""" + Configuration .current .target .swift_arch + """ """
126
127
if Configuration .current .build_mode == Configuration .Debug :
127
128
swift_flags += "-g -Onone -enable-testing "
128
129
elif Configuration .current .build_mode == Configuration .Release :
@@ -135,7 +136,8 @@ def generate_products(self):
135
136
EXTRA_LD_FLAGS = """ + Configuration .current .extra_ld_flags
136
137
137
138
ld_flags += """
138
- TARGET_LDFLAGS = --target=${TARGET} ${EXTRA_LD_FLAGS} -L${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + """ """
139
+ TARGET_LDFLAGS = --target=${TARGET} ${EXTRA_LD_FLAGS} -L${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + \
140
+ """ -L${SDKROOT}/lib/swift/""" + Configuration .current .target .swift_sdk_name + """/""" + Configuration .current .target .swift_arch + """ """
139
141
if Configuration .current .system_root is not None :
140
142
ld_flags += "--sysroot=${SYSROOT}"
141
143
@@ -174,11 +176,11 @@ def generate_products(self):
174
176
175
177
compilec_command = """
176
178
rule CompileC
177
- command = mkdir -p `dirname $out`; ${CLANG} ${TARGET_CFLAGS} $flags ${VERBOSE_FLAGS} -c $in -o $out
179
+ command = mkdir -p `dirname $out`; ${CLANG} ${TARGET_CFLAGS} $flags ${VERBOSE_FLAGS} -c $in -o $out
178
180
description = CompileC: $in
179
181
180
182
rule CompileCxx
181
- command = mkdir -p `dirname $out`; ${CLANGXX} ${TARGET_CFLAGS} ${TARGET_CXXFLAGS} $flags ${VERBOSE_FLAGS} -c $in -o $out
183
+ command = mkdir -p `dirname $out`; ${CLANGXX} ${TARGET_CFLAGS} ${TARGET_CXXFLAGS} $flags ${VERBOSE_FLAGS} -c $in -o $out
182
184
description = CompileCxx: $in
183
185
"""
184
186
@@ -195,13 +197,13 @@ def generate_products(self):
195
197
196
198
assembler_command = """
197
199
rule Assemble
198
- command = mkdir -p `dirname $out`; ${CLANG} -x assembler-with-cpp -c $in -o $out ${TARGET_CFLAGS} $flags ${VERBOSE_FLAGS}
200
+ command = mkdir -p `dirname $out`; ${CLANG} -x assembler-with-cpp -c $in -o $out ${TARGET_CFLAGS} $flags ${VERBOSE_FLAGS}
199
201
description = Assemble: $in
200
202
"""
201
203
202
204
link_command = """
203
205
rule Link
204
- command = mkdir -p `dirname $out`; ${CLANG} ${TARGET_LDFLAGS} ${VERBOSE_FLAGS} $start $in $end $flags -o $out"""
206
+ command = mkdir -p `dirname $out`; ${CLANG} ${TARGET_LDFLAGS} ${VERBOSE_FLAGS} $start $in $end $flags -o $out"""
205
207
if Configuration .current .verbose :
206
208
link_command += "-Xlinker --verbose"
207
209
link_command += """
@@ -211,7 +213,7 @@ def generate_products(self):
211
213
command = mkdir -p `dirname $out`; ${AR} ${AR_FLAGS} $out $in
212
214
description = Archive: $out
213
215
"""
214
-
216
+
215
217
swift_build_command = """
216
218
rule SwiftExecutable
217
219
command = mkdir -p `dirname $out`; ${SWIFTC} ${TARGET_SWIFTEXE_FLAGS} ${EXTRA_LD_FLAGS} $flags $in -o $out
@@ -267,5 +269,5 @@ def generate(self):
267
269
for workspace in self .workspaces :
268
270
workspace .configure ()
269
271
script = self .generate_workspaces ()
270
-
271
-
272
+
273
+
0 commit comments