Skip to content

Commit aacc903

Browse files
author
Harlan Haskins
authored
Merge pull request #27748 from harlanhaskins/reenable-skip-function-bodies
[SkipFunctionBodies] Build everything but the stdlib with function body skipping
2 parents e24c9e7 + 2db9402 commit aacc903

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cmake/modules/SwiftSource.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ function(_compile_swift_files
333333
"-emit-module-interface-path" "${interface_file}")
334334
endif()
335335

336+
if (NOT SWIFTFILE_IS_STDLIB_CORE)
337+
list(APPEND swift_module_flags
338+
"-Xfrontend" "-experimental-skip-non-inlinable-function-bodies")
339+
endif()
340+
336341
# If we have extra regexp flags, check if we match any of the regexps. If so
337342
# add the relevant flags to our swift_flags.
338343
if (SWIFT_EXPERIMENTAL_EXTRA_REGEXP_FLAGS OR SWIFT_EXPERIMENTAL_EXTRA_NEGATIVE_REGEXP_FLAGS)

lib/SILOptimizer/UtilityPasses/NonInlinableFunctionSkippingChecker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "swift/Basic/LLVM.h"
14+
#include "swift/AST/Module.h"
1415
#include "swift/SIL/SILFunction.h"
1516
#include "swift/SIL/SILInstruction.h"
1617
#include "swift/SIL/SILModule.h"
@@ -83,7 +84,7 @@ class NonInlinableFunctionSkippingChecker : public SILModuleTransform {
8384
return;
8485

8586
// Skip this verification for SwiftOnoneSupport
86-
if (getModule()->isOptimizedOnoneSupportModule())
87+
if (getModule()->getSwiftModule()->isOnoneSupportModule())
8788
return;
8889

8990
for (auto &F : *getModule()) {

0 commit comments

Comments
 (0)