diff options
author | Fangrui Song <i@maskray.me> | 2022-07-22 17:16:41 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-07-22 17:16:41 -0700 |
commit | 80a4e6fd31a06143b83947785ea3bd5c04344ea6 (patch) | |
tree | 9ae85bf1f4ff550e1eaa6d8585d895ced45275cb /clang/include | |
parent | e03664d40c707017dc5bab16be19d6939b5719d2 (diff) | |
download | llvm-80a4e6fd31a06143b83947785ea3bd5c04344ea6.zip llvm-80a4e6fd31a06143b83947785ea3bd5c04344ea6.tar.gz llvm-80a4e6fd31a06143b83947785ea3bd5c04344ea6.tar.bz2 |
[Driver] Error for -gsplit-dwarf with RISC-V linker relaxation
-gsplit-dwarf produces a .dwo file which will not be processed by the linker. If
.dwo files contain relocations, they will not be resolved. Therefore the
practice is that .dwo files do not contain relocations.
Address ranges and location description need to use forms/entry kinds indexing
into .debug_addr (DW_FORM_addrx/DW_RLE_startx_endx/etc), which is currently not
implemented.
There is a difficult-to-read MC error with -gsplit-dwarf with RISC-V for both -mrelax and -mno-relax.
```
% clang --target=riscv64-linux-gnu -g -gsplit-dwarf -c a.c
error: A dwo section may not contain relocations
```
We expect to fix -mno-relax soon, so report a driver error for -mrelax for now.
Link: https://github.com/llvm/llvm-project/issues/56642
Reviewed By: compnerd, kito-cheng
Differential Revision: https://reviews.llvm.org/D130190
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/Basic/DiagnosticDriverKinds.td | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index 3c5f7e0..2f600d2 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -682,4 +682,7 @@ def err_drv_invalid_empty_dxil_validator_version : Error< def warn_drv_sarif_format_unstable : Warning< "diagnostic formatting in SARIF mode is currently unstable">, InGroup<DiagGroup<"sarif-format-unstable">>; + +def err_drv_riscv_unsupported_with_linker_relaxation : Error< + "%0 is unsupported with RISC-V linker relaxation (-mrelax)">; } |