Skip to content

clang option -export-dynamic parse to -e xport-dynamic error #64297

@hstk30

Description

@hstk30

https://godbolt.org/z/jsTch9cqq

Compile command clang -export-dynamic test.c simply, but have a warning :

clang: warning: argument unused during compilation: '-e xport-dynamic' [-Wunused-command-line-argument]

It seem clang split option -export-dynamic into -e xport-dynamic.
It's dangerous if -e xport-dynamic is sent to ld, because of -e means

-e ADDRESS, --entry ADDRESS Set start address

I don't think it's reasonable to split option -export-dynamic into -e xport-dynamic.

I can't find the code that split the option, if someone knows , just tell me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions