Skip to content

Commit 3ddbb88

Browse files
committed
[Driver] Force the use of merge-module in merge-module specific test
As support, accept but ignore the -no-emit-module-separately flag in the C++ driver.
1 parent 0f7e57d commit 3ddbb88

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/swift/Option/Options.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,11 @@ def experimental_emit_module_separately:
593593
Flags<[NoInteractiveOption, HelpHidden]>,
594594
HelpText<"Emit module files as a distinct job (new Driver only)">;
595595

596+
def no_emit_module_separately:
597+
Flag<["-"], "no-emit-module-separately">,
598+
Flags<[NoInteractiveOption, HelpHidden]>,
599+
HelpText<"Force using merge-module as the incremental build mode (new Driver only)">;
600+
596601
def requirement_machine_EQ : Joined<["-"], "requirement-machine=">,
597602
Flags<[FrontendOption, ModuleInterfaceOption]>,
598603
HelpText<"Control usage of experimental generics implementation: 'on', 'off', or 'verify'">;

test/Driver/Dependencies/one-way-merge-module-fine.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: cp -r %S/Inputs/one-way-fine/* %t
55
// RUN: touch -t 201401240005 %t/*
66

7-
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -emit-module-path %t/master.swiftmodule -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s
7+
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -emit-module-path %t/master.swiftmodule -module-name main -j1 -v -no-emit-module-separately 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s
88

99
// CHECK-FIRST-NOT: warning
1010
// CHECK-FIRST: Handled main.swift
@@ -14,7 +14,7 @@
1414
// swift-driver checks existence of all outputs
1515
// RUN: touch -t 201401240006 %t/{main,other,master}.swift{module,doc,sourceinfo}
1616

17-
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -emit-module-path %t/master.swiftmodule -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s
17+
// RUN: cd %t && %swiftc_driver -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -emit-module-path %t/master.swiftmodule -module-name main -j1 -v -no-emit-module-separately 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s
1818

1919
// CHECK-SECOND-NOT: warning
2020
// CHECK-SECOND-NOT: Handled

0 commit comments

Comments
 (0)