Skip to contentSkip to conversation

docs: rust: remove `CC=clang` mentions

PATCH Applied Miguel Ojeda 9 participants 9 messages Dec 15, 2023 – Dec 21, 2023

Subsystems (2)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 docs: rust: remove `CC=clang` mentions

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

This should also help avoiding potential confusion around CC=clang [1].

---
 Documentation/rust/quick-start.rst | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Documentation/rust/quick-start.rst +1 -5
index f382914f4191..75faa987079a 100644
@@ -76,7 +76,7 @@ libclang
 
 ``libclang`` (part of LLVM) is used by ``bindgen`` to understand the C code
 in the kernel, which means LLVM needs to be installed; like when the kernel
-is compiled with ``CC=clang`` or ``LLVM=1``.
+is compiled with ``LLVM=1``.
 
 Linux distributions are likely to have a suitable one available, so it is
 best to check that first.
@@ -229,10 +229,6 @@ at the moment. That is::
 
 	make LLVM=1
 
-For architectures that do not support a full LLVM toolchain, use::
-
-	make CC=clang
-
 Using GCC also works for some configurations, but it is very experimental at
 the moment.
 

base-commit: a39b6ac3781d46ba18193c9dbb2110f31e9bffe9

Signature · 1 line
2.43.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 4 lines

This should also help avoiding potential confusion around CC=clang [1].

Reviewed-by on v1 1/1
#2 lore raw
In reply to Miguel Ojeda
Quoted 18 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 4 lines

This should also help avoiding potential confusion around CC=clang [1].

Reviewed-by on v1 1/1
#3 lore raw
In reply to Miguel Ojeda
Quoted 18 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 1 line

This should also help avoiding potential confusion around CC=clang [1].

Yes it should. :)

thanks,

Signature · 2 lines
John Hubbard
NVIDIA
Quoted 33 lines
---
  Documentation/rust/quick-start.rst | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
Documentation/rust/quick-start.rst +1 -5
index f382914f4191..75faa987079a 100644
@@ -76,7 +76,7 @@ libclang
 
  ``libclang`` (part of LLVM) is used by ``bindgen`` to understand the C code
  in the kernel, which means LLVM needs to be installed; like when the kernel
-is compiled with ``CC=clang`` or ``LLVM=1``.
+is compiled with ``LLVM=1``.
 
  Linux distributions are likely to have a suitable one available, so it is
  best to check that first.
@@ -229,10 +229,6 @@ at the moment. That is::
 
  	make LLVM=1
 
-For architectures that do not support a full LLVM toolchain, use::
-
-	make CC=clang
-
  Using GCC also works for some configurations, but it is very experimental at
  the moment.
 

base-commit: a39b6ac3781d46ba18193c9dbb2110f31e9bffe9

Reviewed-by on v1 1/1
#4 lore raw
In reply to Miguel Ojeda

Hi,

Quoted 19 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 2 lines

This should also help avoiding potential confusion around CC=clang [1].

Yes!

Quoted 2 lines
Quoted 29 lines
---
 Documentation/rust/quick-start.rst | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Documentation/rust/quick-start.rst +1 -5
index f382914f4191..75faa987079a 100644
@@ -76,7 +76,7 @@ libclang
 
 ``libclang`` (part of LLVM) is used by ``bindgen`` to understand the C code
 in the kernel, which means LLVM needs to be installed; like when the kernel
-is compiled with ``CC=clang`` or ``LLVM=1``.
+is compiled with ``LLVM=1``.
 
 Linux distributions are likely to have a suitable one available, so it is
 best to check that first.
@@ -229,10 +229,6 @@ at the moment. That is::
 
        make LLVM=1
 
-For architectures that do not support a full LLVM toolchain, use::
-
-       make CC=clang
-
 Using GCC also works for some configurations, but it is very experimental at
 the moment.
 
Quoted 4 lines

base-commit: a39b6ac3781d46ba18193c9dbb2110f31e9bffe9 --
2.43.0

Thanks
Justin

Reviewed-by on v1 1/1
#5 lore raw
In reply to Miguel Ojeda
Quoted 18 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 6 lines

This should also help avoiding potential confusion around CC=clang [1].

---
[...]

Reviewed-by on v1 1/1
#6 lore raw
In reply to Miguel Ojeda
Quoted 18 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 4 lines

This should also help avoiding potential confusion around CC=clang [1].

Yes, the fact that no architecture that CONFIG_RUST supports requires CC=clang seems reason enough for this to be eliminated from the Rust documentation.

Quoted 33 lines
---
 Documentation/rust/quick-start.rst | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Documentation/rust/quick-start.rst +1 -5
index f382914f4191..75faa987079a 100644
@@ -76,7 +76,7 @@ libclang
 
 ``libclang`` (part of LLVM) is used by ``bindgen`` to understand the C code
 in the kernel, which means LLVM needs to be installed; like when the kernel
-is compiled with ``CC=clang`` or ``LLVM=1``.
+is compiled with ``LLVM=1``.
 
 Linux distributions are likely to have a suitable one available, so it is
 best to check that first.
@@ -229,10 +229,6 @@ at the moment. That is::
 
 	make LLVM=1
 
-For architectures that do not support a full LLVM toolchain, use::
-
-	make CC=clang
-
 Using GCC also works for some configurations, but it is very experimental at
 the moment.
 

base-commit: a39b6ac3781d46ba18193c9dbb2110f31e9bffe9

Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#7 lore raw
In reply to Miguel Ojeda
Quoted 18 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 4 lines

This should also help avoiding potential confusion around CC=clang [1].

Signature · 2 lines
Cheers,
Benno
Applied
#8 lore raw
In reply to Miguel Ojeda
Quoted 19 lines · Miguel Ojeda

Nowadays all architectures except s390 recommend using LLVM=1 instead of CC=clang, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes LLVM=1 the way to go:

We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs.

In particular, that commit removes the examples with CC=clang.

Thus do the same in the Rust Quick Start guide, i.e. remove the CC=clang mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all LLVM=1 ones anyway. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to LLVM=1 anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst).

Quoted 4 lines

This should also help avoiding potential confusion around CC=clang [1].

Applied to rust-next -- thanks everyone!

Cheers,
Miguel