[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/132232 This adds some initial documentation about freestanding requirements for Clang. The most critical part of the documentation is spelling out that a conforming freestanding C Standard Library is required; Cl

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-05 Thread James Y Knight via cfe-commits
jyknight wrote: The intent of this standards change is that everyone should be able to depend on library functions from string.h, no matter how minimal or bare-metal their environment. The requirement is now: - , , , , , , , , , and . - , except strcoll, strdup, strerror, strndup, strtok, st

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-05 Thread James Y Knight via cfe-commits
jyknight wrote: This looks potentially-reasonable from the _Clang_ subproject POV, but from a whole-project POV, I think we ought to actually provide a conforming freestanding mode somehow, probably via llvm-libc. So I'd kinda like to hear from llvm-libc folks what they're thinking here. @jhu

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-05 Thread Nikolas Klauser via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - philnik777 wrote: Hmm, yeah. I gues

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: -ffreestanding currently has the following effects: - Disables builtins recognition (-fno-builtins) - Sets `__STDC_HOSTED__` to 0. - Disables unwind tables (-fno-asynchronous-unwind-tables -fno-unwind-tables) (refer to df50259f9856ae98b5a1b34c4c955074aff3c566) Maybe we shou

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: I think this should be more specific on what `-ffreestanding` actually does. Namely, removed implicit search paths, link libraries, passes `-fno-builtin` and lets `int main` function as a normal function. For the `libc` side, I don't think this makes much

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Joseph Huber via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread James Y Knight via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. LGTM to me now. I hope we will eventually provide a conforming freestanding implementation, but that's future work. https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list c

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - AaronBallman wrote: N2359 applies t

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/7] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Eli Friedman via cfe-commits
@@ -1073,6 +1073,29 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread A. Jiang via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - frederick-vs-ja wrote: I found that

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Aaron Ballman via cfe-commits
@@ -1076,13 +1076,11 @@ Language and Target-Independent Features Freestanding Builds --- Passing the ``-ffreestanding`` flag causes Clang to build for a freestanding -(rather than a hosted) environment. The ``__STDC_HOSTED__`` predefined macro -will expand to ``

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Joseph Huber via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread James Y Knight via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Aaron Ballman via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - AaronBallman wrote: This is a bit d

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Aaron Ballman via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/6] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Nikolas Klauser via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - philnik777 wrote: FWIW we list all

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-24 Thread Eli Friedman via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-24 Thread Aaron Ballman via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - AaronBallman wrote: We don't typica

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/5] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes This adds some initial documentation about freestanding requirements for Clang. The most critical part of the documentation is spelling out that a conforming freestanding C Standard Library is required

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-22 Thread A. Jiang via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - frederick-vs-ja wrote: Although the

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/4] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Joseph Huber via cfe-commits
@@ -1073,6 +1073,29 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/2] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Joseph Huber via cfe-commits
@@ -1073,6 +1073,29 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/3] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Joseph Huber via cfe-commits
@@ -1076,13 +1076,11 @@ Language and Target-Independent Features Freestanding Builds --- Passing the ``-ffreestanding`` flag causes Clang to build for a freestanding -(rather than a hosted) environment. The ``__STDC_HOSTED__`` predefined macro -will expand to ``

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I tried to address some of the feedback with some changes, please let me know if you'd like to see additional information. https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > But, what I would like is that we somehow make it trivial for users to get an > implementation of the required functionality without requiring an > externally-provided libc. Some way for users to trivially build and link > against implementations of those functions for th

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-20 Thread Michael Jones via cfe-commits
michaelrj-google wrote: Right now we don't really have a "freestanding" mode, we've got "baremetal" targets which are meant for systems without an OS but they have a lot more than just those four memory functions. You may be thinking of "fullbuild" vs "overlay", which determines if we provide

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This looks potentially-reasonable from the _Clang_ subproject POV, but from a > whole-project POV, I think we ought to actually provide a conforming > freestanding mode somehow, probably via llvm-libc. +1 > So I'd kinda like to hear from llvm-libc folks what they're thin

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Text reads fine, though I cannot approve accuracy :D https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm