Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix zig: unsupported exported_symbols_list #171

Merged

Conversation

serjflint
Copy link

Relates: #164

@messense
Copy link
Member

I'm not sure if this actually works because -exported_symbols_list takes a value, see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-exported_symbols_list.

@messense
Copy link
Member

@serjflint
Copy link
Author

I'm not sure if this actually works because -exported_symbols_list takes a value, see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-exported_symbols_list.

Thanks for pointing that out. Should I do something like this?

And looks like it only applies to macOS targets, see https://github.com/rust-lang/rust/blob/dda95c14e1a9356397c6369762047db031e69461/compiler/rustc_codegen_ssa/src/back/linker.rs#L714-L715

My bad. I haven't checked prior conditions.

I am good at neither Rust nor compiling but I will try to make a PR =)

@messense
Copy link
Member

Should I do something like this?

I think we need remove both -Wl,--exported_symbols_list and the value follows, currently filter_linker_arg doesn't support that, so the code needs a bit refactoring.

@serjflint
Copy link
Author

I think we need remove both -Wl,--exported_symbols_list and the value follows, currently filter_linker_arg doesn't support that, so the code needs a bit refactoring.

My case looks like "-Wl,-exported_symbols_list,/tmp/rustcnkqKsZ/list" so arg.starts_with should do the job.

@messense
Copy link
Member

What's your Rust version?

@serjflint
Copy link
Author

serjflint commented Sep 10, 2023

What's your Rust version?

Stable 0.17.2
Upd: Stable 17.2

@messense
Copy link
Member

OK, so according to the commit message, both -Wl,-exported_symbols_list,<path> and -Wl,-exported_symbols_list <path> can happen.

So IMO we can merge this first and deal with -Wl,-exported_symbols_list <path> later.

@messense
Copy link
Member

Thanks!

@messense messense merged commit fcb5d8a into rust-cross:main Sep 10, 2023
37 of 39 checks passed
@messense messense linked an issue Sep 10, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unsupported linker arg: -exported_symbols_list
2 participants