Skip to content

Commit 966ffbb

Browse files
committed
Propagate -vfsoverlay from driver to frontend.
Today, the driver does not propagate the flag to the frontend but also does not emit an error (silently consuming the flag instead). I'll open a similar PR for apple/swift-driver once this one is merged, in case there are any issues that need to be worked out first. Fixes SR-12834.
1 parent 24fa750 commit 966ffbb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/Driver/ToolChains.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI,
180180

181181
inputArgs.AddAllArgs(arguments, options::OPT_I);
182182
inputArgs.AddAllArgs(arguments, options::OPT_F, options::OPT_Fsystem);
183+
inputArgs.AddAllArgs(arguments, options::OPT_vfsoverlay);
183184

184185
inputArgs.AddLastArg(arguments, options::OPT_AssertConfig);
185186
inputArgs.AddLastArg(arguments, options::OPT_autolink_force_load);

test/Driver/vfs.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Verifies that the driver passes the -vfsoverlay flag to the frontend (SR-12834).
2+
// RUN: %swiftc_driver -driver-print-jobs -c -vfsoverlay overlay.yaml %s | %FileCheck --check-prefix=CHECK-ONE %s
3+
4+
// CHECK-ONE: bin{{/|\\\\}}swift{{c?(\.exe)?"?}} -frontend{{.*}}-c{{.*}}-vfsoverlay overlay.yaml
5+
6+
// Verifies that multiple occurrences are passed in order.
7+
// RUN: %swiftc_driver -driver-print-jobs -c -vfsoverlay overlay1.yaml -vfsoverlay overlay2.yaml -vfsoverlay overlay3.yaml %s | %FileCheck --check-prefix=CHECK-MULTIPLE %s
8+
9+
// CHECK-MULTIPLE: bin{{/|\\\\}}swift{{c?(\.exe)?"?}} -frontend{{.*}}-c{{.*}}-vfsoverlay overlay1.yaml -vfsoverlay overlay2.yaml -vfsoverlay overlay3.yaml

0 commit comments

Comments
 (0)