[PATCH] D119473: Fix the build errors when enabling -DLLVM_ENABLE_MODULES=On and change e53e6ec6ef74

Shubham Sandeep Rastogi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 12:40:26 PST 2022


rastogishubham created this revision.
rastogishubham added reviewers: aprantl, rengolin.
Herald added a subscriber: tpr.
rastogishubham requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

With change e53e6ec6ef74 <https://reviews.llvm.org/rGe53e6ec6ef749c2a9b922a1dc6e14e0538292643> we see errors like

/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:877:1: error: expected identifier
#include "ELFRelocs/LoongArch.def"
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:877:1: error: expected '}'
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:876:6: note: to match this '{'
enum {

^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:876:7: error: expected ';' after enum
enum {

^
;
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:876:1: warning: declaration does not declare anything [-Wmissing-declarations]
enum {
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:877:1: fatal error: import of module 'LLVM_BinaryFormat.ELFRelocs.LoongArch' appears within namespace 'llvm::ELF'
#include "ELFRelocs/LoongArch.def"
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:27:1: note: namespace 'llvm::ELF' begins here
namespace ELF {
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp:14:10: fatal error: could not build module 'LLVM_BinaryFormat'
#include "llvm/BinaryFormat/AMDGPUMetadataVerifier.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On the lldb bots. This patch fixes it


https://reviews.llvm.org/D119473

Files:
  llvm/include/llvm/module.modulemap


Index: llvm/include/llvm/module.modulemap
===================================================================
--- llvm/include/llvm/module.modulemap
+++ llvm/include/llvm/module.modulemap
@@ -83,6 +83,7 @@
     textual header "BinaryFormat/ELFRelocs/x86_64.def"
     textual header "BinaryFormat/WasmRelocs.def"
     textual header "BinaryFormat/MsgPack.def"
+    textual header "BinaryFormat/ELFRelocs/LoongArch.def"
 }
 
 module LLVM_Config {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119473.407645.patch
Type: text/x-patch
Size: 445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220210/1c157d9e/attachment.bin>


More information about the llvm-commits mailing list