Files
swift-mirror/test/Frontend/emit-pcm-pch-setonlyifdifferent.swift
Hiroshi Yamauchi 61ed6bd8e0 Use setOnlyIfDifferent for emit-pcm and emit-pch (#88467)
This is to extend https://github.com/swiftlang/swift/pull/87922 to
emit-pcm actions.

This fixes the issue of system modules getting rebuilt repeatedly on
Windows.

Issue: https://github.com/swiftlang/swift/issues/88449
2026-04-16 13:36:10 -07:00

27 lines
1002 B
Swift

// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %target-swift-emit-pcm -module-name Header -o %t/Header.pcm %t/module.modulemap
// RUN: %{python} %S/../Inputs/getmtime.py %t/Header.pcm > %t/Header.pcm.stat.before
// RUN: %target-swift-emit-pcm -module-name Header -o %t/Header.pcm %t/module.modulemap
// RUN: %{python} %S/../Inputs/getmtime.py %t/Header.pcm > %t/Header.pcm.stat.after
// RUN: diff %t/Header.pcm.stat.before %t/Header.pcm.stat.after
// RUN: %target-swift-frontend -emit-pch %t/Header.h -o %t/Header.h.pch
// RUN: %{python} %S/../Inputs/getmtime.py %t/Header.h.pch > %t/Header.h.pch.stat.before
// RUN: %target-swift-frontend -emit-pch %t/Header.h -o %t/Header.h.pch
// RUN: %{python} %S/../Inputs/getmtime.py %t/Header.h.pch > %t/Header.h.pch.stat.after
// RUN: diff %t/Header.h.pch.stat.before %t/Header.h.pch.stat.after
//--- test.swift
import Header
func testFunc() {}
//--- module.modulemap
module Header {
header "Header.h"
}
//--- Header.h
void header(void);