Skip to content

Commit 619c72c

Browse files
AJIOBsylvestre
authored andcommitted
msvc: add support for Y-, YI, Zf flags
Fixes #2662
1 parent f5edaf1 commit 619c72c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/compiler/msvc.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ msvc_args!(static ARGS: [ArgInfo<ArgData>; _] = [
401401
msvc_take_arg!("Wv:", OsString, Concatenated, PassThroughWithSuffix),
402402
msvc_flag!("X", PassThrough),
403403
msvc_take_arg!("Xclang", OsString, Separated, XClang),
404+
msvc_flag!("Y-", PassThrough), // Disable another PCH options
405+
msvc_take_arg!("YI", OsString, Concatenated, PassThroughWithSuffix), // Has no effect without /Yc
406+
msvc_flag!("YI-", PassThrough), // Has no effect without /Yc
404407
msvc_take_arg!("Yc", PathBuf, Concatenated, TooHardPath), // Compile PCH - not yet supported.
405408
msvc_flag!("Yd", PassThrough),
406409
msvc_flag!("Z7", PassThrough), // Add debug info to .obj files.
@@ -410,6 +413,7 @@ msvc_args!(static ARGS: [ArgInfo<ArgData>; _] = [
410413
msvc_flag!("Za", PassThrough),
411414
msvc_take_arg!("Zc:", OsString, Concatenated, PassThroughWithSuffix),
412415
msvc_flag!("Ze", PassThrough),
416+
msvc_flag!("Zf", PassThrough),
413417
msvc_flag!("Zi", DebugInfo),
414418
msvc_take_arg!("Zm", OsString, Concatenated, PassThroughWithSuffix),
415419
msvc_flag!("Zo", PassThrough),
@@ -512,7 +516,7 @@ msvc_args!(static ARGS: [ArgInfo<ArgData>; _] = [
512516
take_arg!("@", PathBuf, Concatenated, TooHardPath),
513517
]);
514518

515-
// TODO: what to do with precompiled header flags? eg: /Y-, /Yc, /YI, /Yu, /Zf, /Zm
519+
// TODO: what to do with precompiled header flags? eg: /Yc, /YI, /Yu
516520

517521
pub fn parse_arguments(
518522
arguments: &[OsString],
@@ -2290,6 +2294,10 @@ mod test {
22902294
"/d1nodatetime",
22912295
"-EHa",
22922296
"-await:strict",
2297+
"/YI",
2298+
"-Y-",
2299+
"/YI-",
2300+
"-Zf",
22932301
"-Fmdictionary-map",
22942302
"-c",
22952303
"-Fohost_dictionary.obj",
@@ -2319,6 +2327,10 @@ mod test {
23192327
"/d1nodatetime",
23202328
"-EHa",
23212329
"-await:strict",
2330+
"/YI",
2331+
"-Y-",
2332+
"/YI-",
2333+
"-Zf",
23222334
"-Fmdictionary-map"
23232335
)
23242336
);

0 commit comments

Comments
 (0)