Skip to content

Commit 2f5f24c

Browse files
authored
Merge pull request #240 from rust-secure-code/flag-passing-consistency
Fix bare linker argument passing on Apple platforms
2 parents 44554f5 + cbe01d7 commit 2f5f24c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cargo-auditable/src/rustc_wrapper.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ fn rustc_command_with_audit_data(rustc_path: &OsStr) -> Option<Command> {
128128
// Prevent the symbol from being removed as unused by the linker
129129
if is_apple(&target_info) {
130130
if args.bare_linker() {
131-
command.arg("-Clink-arg=-u,_AUDITABLE_VERSION_INFO");
131+
command.arg("-Clink-arg=-u");
132+
command.arg("-Clink-arg=_AUDITABLE_VERSION_INFO");
132133
} else {
133134
command.arg("-Clink-arg=-Wl,-u,_AUDITABLE_VERSION_INFO");
134135
}

0 commit comments

Comments
 (0)