[Frontend][Index] Add frontend option to skip indexing the stdlib (for test performance)

Several tests related to indexing system modules were taking a considerable
amount of time (100+ seconds in the worst case) indexing the standard library.
This adds a frontend option to skip it and updates those tests to pass it.
This commit is contained in:
Nathan Hawes
2020-03-25 14:36:23 -07:00
parent 8b03b05f1d
commit a785fa6cee
9 changed files with 52 additions and 15 deletions

View File

@@ -4,7 +4,7 @@
// make sure the frontend job doesn't try to emit the auxiliary outputs based
// on the non-indexed files. (This is how Xcode currently constructs -index-file
// invocations: take a normal build command and add extra arguments to it.)
// RUN: %target-build-swift -index-file -index-file-path %S/Inputs/SwiftModuleA.swift %S/Inputs/SwiftModuleA.swift %s -index-store-path %t/idx -module-name driver_index -emit-objc-header-path %t/out.h -emit-module-interface-path %t/out.swiftinterface
// RUN: %target-build-swift -index-file -index-file-path %S/Inputs/SwiftModuleA.swift %S/Inputs/SwiftModuleA.swift %s -index-store-path %t/idx -Xfrontend -index-ignore-stdlib -module-name driver_index -emit-objc-header-path %t/out.h -emit-module-interface-path %t/out.swiftinterface
// RUN: test ! -f %t/out.h
// RUN: test ! -f %t/out.swiftinterface