-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[libc] Add faccessat entrypoints for aarch64 and riscv #165869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc] Add faccessat entrypoints for aarch64 and riscv #165869
Conversation
|
@llvm/pr-subscribers-backend-risc-v Author: Marcell Leleszi (mleleszi) ChangesAdd faccessat entrypoints for aarch64 and riscv linux. Entrypoints are removed is faccessat2 syscall is not available. Full diff: https://github.com/llvm/llvm-project/pull/165869.diff 4 Files Affected:
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 714120a79e39a..e0dd15b803253 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -325,8 +325,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.unistd.dup2
libc.src.unistd.dup3
libc.src.unistd.execve
- # Disabled while SYS_faccessat2 is unavailable on the buildbot.
- # libc.src.unistd.faccessat
+ libc.src.unistd.faccessat
libc.src.unistd.fchdir
libc.src.unistd.fpathconf
libc.src.unistd.fsync
diff --git a/libc/config/linux/aarch64/exclude.txt b/libc/config/linux/aarch64/exclude.txt
new file mode 100644
index 0000000000000..d3147686a7a9d
--- /dev/null
+++ b/libc/config/linux/aarch64/exclude.txt
@@ -0,0 +1,7 @@
+include(CheckSymbolExists)
+check_symbol_exists(SYS_faccessat2 "sys/syscall.h" HAVE_SYS_FACCESSAT2)
+if(NOT HAVE_SYS_FACCESSAT2)
+ list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
+ libc.src.unistd.faccessat
+ )
+endif()
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index f6bbb346d10e5..0d031d8844f13 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -329,6 +329,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.unistd.dup2
libc.src.unistd.dup3
libc.src.unistd.execve
+ libc.src.unistd.faccessat
libc.src.unistd.fchdir
libc.src.unistd.fpathconf
libc.src.unistd.fsync
diff --git a/libc/config/linux/riscv/exclude.txt b/libc/config/linux/riscv/exclude.txt
new file mode 100644
index 0000000000000..d3147686a7a9d
--- /dev/null
+++ b/libc/config/linux/riscv/exclude.txt
@@ -0,0 +1,7 @@
+include(CheckSymbolExists)
+check_symbol_exists(SYS_faccessat2 "sys/syscall.h" HAVE_SYS_FACCESSAT2)
+if(NOT HAVE_SYS_FACCESSAT2)
+ list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
+ libc.src.unistd.faccessat
+ )
+endif()
|
|
@llvm/pr-subscribers-libc Author: Marcell Leleszi (mleleszi) ChangesAdd faccessat entrypoints for aarch64 and riscv linux. Entrypoints are removed is faccessat2 syscall is not available. Full diff: https://github.com/llvm/llvm-project/pull/165869.diff 4 Files Affected:
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 714120a79e39a..e0dd15b803253 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -325,8 +325,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.unistd.dup2
libc.src.unistd.dup3
libc.src.unistd.execve
- # Disabled while SYS_faccessat2 is unavailable on the buildbot.
- # libc.src.unistd.faccessat
+ libc.src.unistd.faccessat
libc.src.unistd.fchdir
libc.src.unistd.fpathconf
libc.src.unistd.fsync
diff --git a/libc/config/linux/aarch64/exclude.txt b/libc/config/linux/aarch64/exclude.txt
new file mode 100644
index 0000000000000..d3147686a7a9d
--- /dev/null
+++ b/libc/config/linux/aarch64/exclude.txt
@@ -0,0 +1,7 @@
+include(CheckSymbolExists)
+check_symbol_exists(SYS_faccessat2 "sys/syscall.h" HAVE_SYS_FACCESSAT2)
+if(NOT HAVE_SYS_FACCESSAT2)
+ list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
+ libc.src.unistd.faccessat
+ )
+endif()
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index f6bbb346d10e5..0d031d8844f13 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -329,6 +329,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.unistd.dup2
libc.src.unistd.dup3
libc.src.unistd.execve
+ libc.src.unistd.faccessat
libc.src.unistd.fchdir
libc.src.unistd.fpathconf
libc.src.unistd.fsync
diff --git a/libc/config/linux/riscv/exclude.txt b/libc/config/linux/riscv/exclude.txt
new file mode 100644
index 0000000000000..d3147686a7a9d
--- /dev/null
+++ b/libc/config/linux/riscv/exclude.txt
@@ -0,0 +1,7 @@
+include(CheckSymbolExists)
+check_symbol_exists(SYS_faccessat2 "sys/syscall.h" HAVE_SYS_FACCESSAT2)
+if(NOT HAVE_SYS_FACCESSAT2)
+ list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
+ libc.src.unistd.faccessat
+ )
+endif()
|
michaelrj-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it might be good to add a comment to entrypoints.txt explaining that faccessat might get excluded, or a cmake message when that happens if verbose logging is on.
michaelrj-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it might be good to add a comment to entrypoints.txt explaining that faccessat might get excluded, or a cmake message when that happens if verbose logging is on.
|
Added verbose cmake message. Can you merge please? |
Add faccessat entrypoints for aarch64 and riscv linux. Entrypoints are removed if faccessat2 syscall is not available.