[libc-commits] [libc] [libc] Implement sys/personality.h (PR #195065)
Alexey Samsonov via libc-commits
libc-commits at lists.llvm.org
Thu Apr 30 09:55:22 PDT 2026
================
@@ -0,0 +1,19 @@
+//===-- Linux header personality.h ----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SYS_PERSONALITY_H
+#define LLVM_LIBC_SYS_PERSONALITY_H
+
+#include "__llvm-libc-common.h"
+
+// The personality constants and flags are defined by the kernel.
+#include <linux/personality.h>
----------------
vonosmas wrote:
We can avoid having a template header here with a bit more indirection.
* Add at least one macro that the header is expected to provide to `personality.yaml`.
* Specify it as listed is header `personality-macros.h`
* Create this header in `include/llvm-libc-macros/` directory, and have it `#include <linux/personality.h>` on Linux platforms and `#error` elsewhere.
I think this would be more consistent with how we handle POSIX/Linux-specific macro definitions now.
https://github.com/llvm/llvm-project/pull/195065
More information about the libc-commits
mailing list