[PATCH] D158375: Fix build for riscv32

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 23:57:21 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-exegesis/lib/X86/Target.cpp:1094
+// they are effectively the same as all ofsets here are set to 0.
+#if defined(__arm__) || (defined(__riscv) && (__riscv_xlen == 32))
 #define SYS_mmap SYS_mmap2
----------------
I suggest that we write `#if defined(SYS_mmap2) && !defined(SYS_mmap)`, which will help future 32-bit architectures.

`// Some 32-bit architectures don't have mmap and use mmap2 instead ...`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158375/new/

https://reviews.llvm.org/D158375



More information about the llvm-commits mailing list