Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle -Xclang args when invoking clang/clang++ on windows cmake #1500

Merged
merged 4 commits into from
Jan 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: identify gcodeview as PassThroughFlag
  • Loading branch information
Danielmelody authored and sylvestre committed Dec 31, 2022
commit 6618b2d0bf0435890209905835e9702c5834a0ca
2 changes: 1 addition & 1 deletion src/compiler/clang.rs
Original file line number Diff line number Diff line change
@@ -185,7 +185,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
take_arg!("-fprofile-use", PathBuf, Concatenated('='), ClangProfileUse),
take_arg!("-fsanitize-blacklist", PathBuf, Concatenated('='), ExtraHashFile),
take_arg!("-gcc-toolchain", OsString, Separated, PassThrough),
flag!("-gcodeview", PreprocessorArgumentFlag),
flag!("-gcodeview", PassThroughFlag),
take_arg!("-include-pch", PathBuf, CanBeSeparated, PreprocessorArgumentPath),
take_arg!("-load", PathBuf, Separated, ExtraHashFile),
take_arg!("-mllvm", OsString, Separated, PassThrough),
4 changes: 4 additions & 0 deletions src/compiler/gcc.rs
Original file line number Diff line number Diff line change
@@ -113,6 +113,7 @@ ArgData! { pub
NoDiagnosticsColorFlag,
// Should only be necessary for -Xclang flags - unknown flags not hidden behind
// that are assumed to not affect compilation
PassThroughFlag,
PassThrough(OsString),
PassThroughPath(PathBuf),
PreprocessorArgumentFlag,
@@ -342,6 +343,7 @@ where
need_explicit_dep_argument_path = DepArgumentRequirePath::Provided
}
Some(ExtraHashFile(_))
| Some(PassThroughFlag)
| Some(PreprocessorArgumentFlag)
| Some(PreprocessorArgument(_))
| Some(PreprocessorArgumentPath(_))
@@ -382,6 +384,7 @@ where
| Some(DiagnosticsColor(_))
| Some(DiagnosticsColorFlag)
| Some(NoDiagnosticsColorFlag)
| Some(PassThroughFlag)
| Some(PassThrough(_))
| Some(PassThroughPath(_)) => &mut common_args,
Some(Arch(_)) => &mut arch_args,
@@ -446,6 +449,7 @@ where
| Some(NoDiagnosticsColorFlag)
| Some(Arch(_))
| Some(PassThrough(_))
| Some(PassThroughFlag)
| Some(PassThroughPath(_)) => &mut common_args,
Some(ExtraHashFile(path)) => {
extra_hash_files.push(cwd.join(path));
3 changes: 2 additions & 1 deletion src/compiler/msvc.rs
Original file line number Diff line number Diff line change
@@ -700,7 +700,8 @@ pub fn parse_arguments(
| Some(DiagnosticsColorFlag)
| Some(NoDiagnosticsColorFlag)
| Some(Arch(_))
| Some(PassThrough(_))
| Some(PassThroughFlag)
| Some(PassThrough(_))
| Some(PassThroughPath(_))
| Some(PedanticFlag)
| Some(Standard(_)) => &mut common_args,