[all-commits] [llvm/llvm-project] 01a92f: [llvm-exegesis] Use mmap2 when mmap is unavailable...
Khem Raj via All-commits
all-commits at lists.llvm.org
Fri Aug 25 10:43:15 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 01a92f06f23585f15b3e83b7c378d0df2d91e06b
https://github.com/llvm/llvm-project/commit/01a92f06f23585f15b3e83b7c378d0df2d91e06b
Author: Khem Raj <raj.khem at gmail.com>
Date: 2023-08-25 (Fri, 25 Aug 2023)
Changed paths:
M llvm/tools/llvm-exegesis/lib/X86/Target.cpp
M llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp
Log Message:
-----------
[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 at maskray.me>
Differential Revision: https://reviews.llvm.org/D158375
More information about the All-commits
mailing list