Skip to content

Commit 07f17ac

Browse files
committed
Order flags correctly
Signed-off-by: Gavin Zhao <git@gzgz.dev>
1 parent 8bf5652 commit 07f17ac

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/compiler/clang.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ impl CCompilerImpl for Clang {
167167

168168
counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
169169
take_arg!("--dependent-lib", OsString, Concatenated('='), PassThrough),
170+
take_arg!("--hip-device-lib-path", PathBuf, Concatenated('='), PassThroughPath),
171+
take_arg!("--hip-path", PathBuf, Concatenated('='), PassThroughPath),
172+
take_arg!("--rocm-path", PathBuf, Concatenated('='), PassThroughPath),
170173
take_arg!("--serialize-diagnostics", OsString, Separated, PassThrough),
171174
take_arg!("--target", OsString, Separated, PassThrough),
172175
// Note: for clang we must override the dep options from gcc.rs with `CanBeSeparated`.
@@ -181,7 +184,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
181184
flag!("-fcolor-diagnostics", DiagnosticsColorFlag),
182185
flag!("-fcxx-modules", TooHardFlag),
183186
take_arg!("-fdebug-compilation-dir", OsString, Separated, PassThrough),
184-
take_arg!("-fembed-offload-object", PathBuf, Concatenated, ExtraHashFile),
187+
take_arg!("-fembed-offload-object", PathBuf, Concatenated('='), ExtraHashFile),
185188
flag!("-fmodules", TooHardFlag),
186189
flag!("-fno-color-diagnostics", NoDiagnosticsColorFlag),
187190
flag!("-fno-pch-timestamp", PassThroughFlag),
@@ -197,14 +200,11 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
197200
flag!("-fuse-ctor-homing", PassThroughFlag),
198201
take_arg!("-gcc-toolchain", OsString, Separated, PassThrough),
199202
flag!("-gcodeview", PassThroughFlag),
200-
take_arg!("--hip-path", PathBuf, Concatenated, PassThroughPath),
201-
take_arg!("--hip-device-lib-path", PathBuf, Concatenated, PassThroughPath),
202203
take_arg!("-include-pch", PathBuf, CanBeSeparated, PreprocessorArgumentPath),
203204
take_arg!("-load", PathBuf, Separated, ExtraHashFile),
204205
take_arg!("-mllvm", OsString, Separated, PassThrough),
205206
flag!("-no-opaque-pointers", PreprocessorArgumentFlag),
206207
take_arg!("-plugin-arg", OsString, Concatenated('-'), PassThrough),
207-
take_arg!("--rocm-path", PathBuf, Concatenated, PassThroughPath),
208208
take_arg!("-target", OsString, Separated, PassThrough),
209209
flag!("-verify", PreprocessorArgumentFlag),
210210
take_arg!("/winsysroot", PathBuf, CanBeSeparated, PassThroughPath),

0 commit comments

Comments
 (0)