This adds -fdata-sections, -ffunction-sections, and their negations to
the list of -f options accepted by clang-cl. As a result, these
options can be used with the same spelling for both clang and
clang-cl.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The clang-cl spelling of this is /Gy and /Gw. If you want to use the gcc spelling, you can do that through the /clang: flag.
Comment Actions
In other words: The point of clang-cl is to use cl.exe flag spellings where they exist. So unless there's some good reason for adding this, I don't think we should add it.
Comment Actions
Ok, thanks for clarifying.
The benefit this would get us is not having to spell the flags differently depending on whether the frontend is clang or clang-cl. I figured this would fit in with all the -f options we already take and not really increase the risk of conflicting with future cl.exe options. But as you said, there are clang-cl options that will enable the exact same functionality, so I'll abandon this.