Skip to content

Using a plugin that was built without -C prefer-dynamic causes LLVM error #28434

@pczarn

Description

@pczarn

I forgot to add plugin = true to Cargo.toml and got this when building an external test:

: CommandLine Error: Option 'interpreter-print-volatile' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

For reference, this is an incorrect way to build a plugin:
rustc src/lib.rs --crate-type dylib -g
This is added by plugin = true:
rustc src/lib.rs --crate-type dylib -C prefer-dynamic -g --test -C metadata=7ede684f643fceb6 -C extra-filename=-7ede684f643fceb6

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-frontendArea: Compiler frontend (errors, parsing and HIR)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions