diff options
author | David Spickett <david.spickett@linaro.org> | 2023-07-06 08:49:33 +0000 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2023-07-06 14:47:02 +0000 |
commit | 36df92dcd9195e002f91390b3dca1a8b66dedfe2 (patch) | |
tree | 488d275e2608667e31282e782b3f680736e4481a /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | cb0f98e10b7cfdd4f3e936b2a00cdaf29e5c8659 (diff) | |
download | llvm-36df92dcd9195e002f91390b3dca1a8b66dedfe2.zip llvm-36df92dcd9195e002f91390b3dca1a8b66dedfe2.tar.gz llvm-36df92dcd9195e002f91390b3dca1a8b66dedfe2.tar.bz2 |
[libcxx] Only add -GR- option to MSVC or clang-cl builds
Previously we added both `-GR-` and `-fno-rtti` if RTTI was disabled.
When building with clang 16.x, that caused this error in part of the build:
```
clang-16: error: argument unused during compilation: '-G R-' [-Werror,-Wunused-command-line-argument]
```
I think the strange message is because clang is seeing `R-` as the argument
to `-G`, which is a valid clang option.
`-GR-` is an alternate syntax for the `/GR-` option for MSVC
(the dash means disable RTTI):
https://learn.microsoft.com/en-us/cpp/build/reference/gr-enable-run-time-type-information?view=msvc-170
This error is sort of fixed by cd18efb61d759405956dbd30e4b5f2720d8e1783
but not intentionally. Also, we'd have to wait for 17.x to benefit from that.
The proper fix here is to only add `-GR-` if we are building with MSVC
or the MSVC-like clang-cl, and add `-fno-rtti` if not.
Reviewed By: #libc, simon_tatham, michaelplatings, ldionne
Differential Revision: https://reviews.llvm.org/D154582
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions