Skip to content

Commit ada88e1

Browse files
committed
Fix build failures when building a debug and/or non-optimized version of the standard library.
No pre-specializations will be emitted in this case.
1 parent 9a40e2d commit ada88e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Serialization/SerializeSIL.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,8 +1682,10 @@ void SILSerializer::writeSILBlock(const SILModule *SILMod) {
16821682
}
16831683

16841684
// Emit only declarations if it is a module with pre-specializations.
1685+
// And only do it in optimized builds.
16851686
bool emitDeclarationsForOnoneSupport =
1686-
SILMod->getSwiftModule()->getName().str() == SWIFT_ONONE_SUPPORT;
1687+
SILMod->getSwiftModule()->getName().str() == SWIFT_ONONE_SUPPORT &&
1688+
SILMod->getOptions().Optimization > SILOptions::SILOptMode::Debug;
16871689

16881690
// Go through all the SILFunctions in SILMod and write out any
16891691
// mandatory function bodies.

0 commit comments

Comments
 (0)