Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-exegesis] Use mmap2 when mmap is unavailable to fix riscv32 build
Some 32-bit architectures don't have mmap and define mmap2 instead. E.g. on riscv32 we may get ``` | /mnt/b/yoe/master/build/tmp/work-shared/llvm-project-source-17.0.0-r0/git/llvm/tools/llvm-exegesis/lib/X86/Target.cpp:1116:19: error: use of undeclared identifier 'SYS_mmap' | 1116 | generateSyscall(SYS_mmap, MmapCode); | | ^ | /mnt/b/yoe/master/build/tmp/work-shared/llvm-project-source-17.0.0-r0/git/llvm/tools/llvm-exegesis/lib/X86/Target.cpp:1134:19: error: use of undeclared identifier 'SYS_mmap' | 1134 | generateSyscall(SYS_mmap, GeneratedCode); | | ^ | 1 warning and 2 errors generated. ``` Co-Authored-By: Fangrui Song <i@maskray.me> Differential Revision: https://reviews.llvm.org/D158375 (cherry picked from commit 01a92f0)
- Loading branch information