File tree 1 file changed +43
-22
lines changed
llvm/utils/gn/secondary/compiler-rt/lib/builtins 1 file changed +43
-22
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ declare_args() {
8
8
9
9
lse_targets = []
10
10
11
+ if (current_cpu == " x86" || current_cpu == " x64" ) {
12
+ # long double is not 80 bits on Android or MSVC.
13
+ long_double_is_80_bits = current_os != " android" && current_os != " win"
14
+ }
15
+
11
16
if (current_cpu == " arm64" ) {
12
17
foreach (pat ,
13
18
[
@@ -270,24 +275,28 @@ static_library("builtins") {
270
275
sources -= [ " fp_mode.c" ]
271
276
sources += [
272
277
" cpu_model.c" ,
273
- " divxc3.c" ,
274
- " extendxftf2.c" ,
275
- " fixunsxfdi.c" ,
276
- " fixunsxfsi.c" ,
277
- " fixunsxfti.c" ,
278
- " fixxfdi.c" ,
279
- " fixxfti.c" ,
280
- " floatdixf.c" ,
281
- " floattixf.c" ,
282
- " floatundixf.c" ,
283
- " floatuntixf.c" ,
284
278
" i386/fp_mode.c" ,
285
- " mulxc3.c" ,
286
- " powixf2.c" ,
287
279
" truncdfbf2.c" ,
288
280
" truncsfbf2.c" ,
289
- " trunctfxf2.c" ,
290
281
]
282
+ if (long_double_is_80_bits ) {
283
+ sources += [
284
+ " divxc3.c" ,
285
+ " extendxftf2.c" ,
286
+ " fixunsxfdi.c" ,
287
+ " fixunsxfsi.c" ,
288
+ " fixunsxfti.c" ,
289
+ " fixxfdi.c" ,
290
+ " fixxfti.c" ,
291
+ " floatdixf.c" ,
292
+ " floattixf.c" ,
293
+ " floatundixf.c" ,
294
+ " floatuntixf.c" ,
295
+ " mulxc3.c" ,
296
+ " powixf2.c" ,
297
+ " trunctfxf2.c" ,
298
+ ]
299
+ }
291
300
}
292
301
if (current_cpu == " x86" ) {
293
302
sources -= [
@@ -296,10 +305,8 @@ static_library("builtins") {
296
305
" divdi3.c" ,
297
306
" floatdidf.c" ,
298
307
" floatdisf.c" ,
299
- " floatdixf.c" ,
300
308
" floatundidf.c" ,
301
309
" floatundisf.c" ,
302
- " floatundixf.c" ,
303
310
" lshrdi3.c" ,
304
311
" moddi3.c" ,
305
312
" muldi3.c" ,
@@ -312,36 +319,50 @@ static_library("builtins") {
312
319
" i386/divdi3.S" ,
313
320
" i386/floatdidf.S" ,
314
321
" i386/floatdisf.S" ,
315
- " i386/floatdixf.S" ,
316
322
" i386/floatundidf.S" ,
317
323
" i386/floatundisf.S" ,
318
- " i386/floatundixf.S" ,
319
324
" i386/lshrdi3.S" ,
320
325
" i386/moddi3.S" ,
321
326
" i386/muldi3.S" ,
322
327
" i386/udivdi3.S" ,
323
328
" i386/umoddi3.S" ,
324
329
]
330
+ if (long_double_is_80_bits ) {
331
+ sources -= [
332
+ " floatdixf.c" ,
333
+ " floatundixf.c" ,
334
+ ]
335
+ sources += [
336
+ " i386/floatdixf.S" ,
337
+ " i386/floatundixf.S" ,
338
+ ]
339
+ }
325
340
if (current_os == " win" ) {
326
341
sources += [ " i386/chkstk.S" ]
327
342
}
328
343
} else if (current_cpu == " x64" ) {
329
344
sources -= [
330
345
" floatdidf.c" ,
331
346
" floatdisf.c" ,
332
- " floatdixf.c" ,
333
347
" floatundidf.c" ,
334
348
" floatundisf.c" ,
335
- " floatundixf.c" ,
336
349
]
337
350
sources += [
338
351
" x86_64/floatdidf.c" ,
339
352
" x86_64/floatdisf.c" ,
340
- " x86_64/floatdixf.c" ,
341
353
" x86_64/floatundidf.S" ,
342
354
" x86_64/floatundisf.S" ,
343
- " x86_64/floatundixf.S" ,
344
355
]
356
+ if (long_double_is_80_bits ) {
357
+ sources -= [
358
+ " floatdixf.c" ,
359
+ " floatundixf.c" ,
360
+ ]
361
+ sources += [
362
+ " x86_64/floatdixf.c" ,
363
+ " x86_64/floatundixf.S" ,
364
+ ]
365
+ }
345
366
if (current_os == " win" ) {
346
367
sources += [ " x86_64/chkstk.S" ]
347
368
}
You can’t perform that action at this time.
0 commit comments