Skip to content

Commit 96d7400

Browse files
Snektronsylvestre
authored andcommitted
Add support for Xclang flag '-mrelax-all'
1 parent 5cc9346 commit 96d7400

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/compiler/clang.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
239239
take_arg!("-load", PathBuf, Separated, ExtraHashFile),
240240
flag!("-mconstructor-aliases", PassThroughFlag),
241241
take_arg!("-mllvm", OsString, Separated, PassThrough),
242+
flag!("-mrelax-all", PassThroughFlag),
242243
flag!("-no-opaque-pointers", PreprocessorArgumentFlag),
243244
take_arg!("-plugin-arg", OsString, Concatenated('-'), PassThrough),
244245
take_arg!("-target", OsString, Separated, PassThrough),
@@ -911,6 +912,12 @@ mod test {
911912
assert_eq!(ovec!["-Xclang", "-mconstructor-aliases"], a.common_args);
912913
}
913914

915+
#[test]
916+
fn test_parse_xclang_mrelax_all() {
917+
let a = parses!("-c", "foo.c", "-o", "foo.o", "-Xclang", "-mrelax-all");
918+
assert_eq!(ovec!["-Xclang", "-mrelax-all"], a.common_args);
919+
}
920+
914921
#[test]
915922
fn test_parse_fplugin() {
916923
let a = parses!("-c", "foo.c", "-o", "foo.o", "-fplugin", "plugin.so");

0 commit comments

Comments
 (0)