Skip to content

Commit 0940f75

Browse files
committed
Disable this test when lto is enabled.
Right now when we enable lto in swift, we lto the runtime and the compiler. In the case where we are making dylibs for the runtime this is great, we get better performance. On the other hand, there is a bug now that makes it so that the static libswiftCore also gets the lto bitcode. We do not want users to take this potential compile time hit from ltoing that archive. I have not had time to look into this issue yet, so I am xfailing this test when LTO is enabled. rdar://26281388
1 parent 9d86ca2 commit 0940f75

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/Driver/static-stdlib.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Statically link a "hello world" program
22
// XFAIL: linux
3+
// XFAIL: lto
34
// REQUIRES: static_stdlib
45
print("hello world!")
56
// RUN: rm -rf %t && mkdir %t

test/lit.site.cfg.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ if "@SWIFT_ASAN_BUILD@" == "TRUE":
2626
else:
2727
config.available_features.add('no_asan')
2828

29+
if '@SWIFT_ENABLE_LTO@' == 'TRUE':
30+
config.available_features.add('lto')
31+
else:
32+
config.available_features.add('no_lto')
33+
2934
if "@LLVM_ENABLE_ASSERTIONS@" == "TRUE":
3035
config.available_features.add('asserts')
3136
else:

0 commit comments

Comments
 (0)