diff --git a/src/compiler/clang.rs b/src/compiler/clang.rs index 268f3f456..b6cee51ed 100644 --- a/src/compiler/clang.rs +++ b/src/compiler/clang.rs @@ -184,6 +184,7 @@ counted_array!(pub static ARGS: [ArgInfo; _] = [ // Note: this overrides the -fprofile-use option in gcc.rs. take_arg!("-fprofile-use", PathBuf, Concatenated('='), ClangProfileUse), take_arg!("-fsanitize-blacklist", PathBuf, Concatenated('='), ExtraHashFile), + flag!("-fuse-ctor-homing", PassThroughFlag), take_arg!("-gcc-toolchain", OsString, Separated, PassThrough), flag!("-gcodeview", PassThroughFlag), take_arg!("-include-pch", PathBuf, CanBeSeparated, PreprocessorArgumentPath), @@ -550,6 +551,12 @@ mod test { assert_eq!(ovec!["-Xclang", "-no-opaque-pointers"], a.preprocessor_args); } + #[test] + fn test_parse_xclang_use_ctor_homing() { + let a = parses!("-c", "foo.c", "-o", "foo.o", "-Xclang", "-fuse-ctor-homing"); + assert_eq!(ovec!["-Xclang", "-fuse-ctor-homing"], a.common_args); + } + #[test] fn test_parse_fplugin() { let a = parses!("-c", "foo.c", "-o", "foo.o", "-fplugin", "plugin.so");