Files
swift-mirror/test/ClangImporter/validate-modules-once.swift
Artem Chikin 3ea5087e2f Add Swift compilation flags to enable Clang's validate-per-build-session module behavior
Add '-validate-clang-modules-once' and '-clang-build-session-file' corresponding to Clang's '-fmodules-validate-once-per-build-session' and '-fbuild-session-file='. Ensure they are propagated to module interface build sub-invocations.

We require these to be first-class Swift options in order to ensure they are propagated to both: ClangImporter and implicit interface build compiler sub-invocations.

Compiler portion of rdar://105982120
2023-02-28 13:19:05 -08:00

9 lines
316 B
Swift

// RUN: %empty-directory(%t)
// RUN: touch %t/Build.session
// RUN: %swift %s -typecheck -dump-clang-diagnostics -validate-clang-modules-once -clang-build-session-file %t/Build.session 2>&1 | %FileCheck %s
public func foo() {}
// CHECK: '-fmodules-validate-once-per-build-session'
// CHECK: '-fbuild-session-file=