Skip to content

Commit

Permalink
Order flags correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Zhao <git@gzgz.dev>
  • Loading branch information
GZGavinZhao committed Feb 6, 2024
1 parent 8bf5652 commit 07f17ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/compiler/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ impl CCompilerImpl for Clang {

counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
take_arg!("--dependent-lib", OsString, Concatenated('='), PassThrough),
take_arg!("--hip-device-lib-path", PathBuf, Concatenated('='), PassThroughPath),
take_arg!("--hip-path", PathBuf, Concatenated('='), PassThroughPath),
take_arg!("--rocm-path", PathBuf, Concatenated('='), PassThroughPath),
take_arg!("--serialize-diagnostics", OsString, Separated, PassThrough),
take_arg!("--target", OsString, Separated, PassThrough),
// Note: for clang we must override the dep options from gcc.rs with `CanBeSeparated`.
Expand All @@ -181,7 +184,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
flag!("-fcolor-diagnostics", DiagnosticsColorFlag),
flag!("-fcxx-modules", TooHardFlag),
take_arg!("-fdebug-compilation-dir", OsString, Separated, PassThrough),
take_arg!("-fembed-offload-object", PathBuf, Concatenated, ExtraHashFile),
take_arg!("-fembed-offload-object", PathBuf, Concatenated('='), ExtraHashFile),
flag!("-fmodules", TooHardFlag),
flag!("-fno-color-diagnostics", NoDiagnosticsColorFlag),
flag!("-fno-pch-timestamp", PassThroughFlag),
Expand All @@ -197,14 +200,11 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
flag!("-fuse-ctor-homing", PassThroughFlag),
take_arg!("-gcc-toolchain", OsString, Separated, PassThrough),
flag!("-gcodeview", PassThroughFlag),
take_arg!("--hip-path", PathBuf, Concatenated, PassThroughPath),
take_arg!("--hip-device-lib-path", PathBuf, Concatenated, PassThroughPath),
take_arg!("-include-pch", PathBuf, CanBeSeparated, PreprocessorArgumentPath),
take_arg!("-load", PathBuf, Separated, ExtraHashFile),
take_arg!("-mllvm", OsString, Separated, PassThrough),
flag!("-no-opaque-pointers", PreprocessorArgumentFlag),
take_arg!("-plugin-arg", OsString, Concatenated('-'), PassThrough),
take_arg!("--rocm-path", PathBuf, Concatenated, PassThroughPath),
take_arg!("-target", OsString, Separated, PassThrough),
flag!("-verify", PreprocessorArgumentFlag),
take_arg!("/winsysroot", PathBuf, CanBeSeparated, PassThroughPath),
Expand Down

0 comments on commit 07f17ac

Please sign in to comment.