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
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
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
@@ -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
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
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
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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
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
@@ -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 ``
@@ -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
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
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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
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
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
@@ -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
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
@@ -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
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
@@ -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
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
@@ -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 ``
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
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
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
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
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
46 matches
Mail list logo