[vim/vim] Add compiling with clang as default. (PR #19043)

8 views
Skip to first unread message

Łukasz Wieczorek

unread,
Dec 30, 2025, 10:36:02 AM (19 hours ago) Dec 30
to vim/vim, Subscribed

Hello,

I just tried compiling vim with clang.
It is not stright forward.
Thought it should work like this:

gh repo clone vim/vim
cd ./vim/src/
CC=clang make
sudo make install

I added a script and modified Makefile, but in the end would like a simplier solution to use different compiler.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19043

Commit Summary

  • 53b9047 Add compiling with clang as default.

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043@github.com>

Enno

unread,
Dec 30, 2025, 12:09:11 PM (18 hours ago) Dec 30
to vim/vim, Subscribed

@Konfekt commented on this pull request.


In bin/compile.sh:

> @@ -0,0 +1,11 @@
+#!/usr/bin/env fish

Wouldn't bash be a more common choice?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/review/3618829866@github.com>

Yegappan Lakshmanan

unread,
Dec 30, 2025, 2:12:28 PM (16 hours ago) Dec 30
to vim/vim, Subscribed

@yegappan commented on this pull request.


In src/Makefile:

> @@ -254,7 +254,7 @@
 #DO NOT CHANGE the next line, we need it for configure to find the compiler
 #instead of using the default from the "make" program.
 #Use a line further down to change the value for CC.
-CC=
+CC=clang

This change is not backwards compatible, as not everyone will have the Clang toolchain installed in their environment.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/review/3619060611@github.com>

Łukasz Wieczorek

unread,
Dec 30, 2025, 10:09:35 PM (8 hours ago) Dec 30
to vim/vim, Push

@wieczorek1990 pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/before/53b90471f507212bb52513753e355d2e2e6a53eb/after/c35aa0e17d16bfba3cfe2ec5df622c3ec91fe4eb@github.com>

Łukasz Wieczorek

unread,
Dec 30, 2025, 10:11:58 PM (8 hours ago) Dec 30
to vim/vim, Subscribed

@wieczorek1990 commented on this pull request.


In bin/compile.sh:

> @@ -0,0 +1,11 @@
+#!/usr/bin/env fish

Changed to sh.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/review/3620133075@github.com>

Łukasz Wieczorek

unread,
Dec 30, 2025, 10:12:30 PM (8 hours ago) Dec 30
to vim/vim, Subscribed

@wieczorek1990 commented on this pull request.


In src/Makefile:

> @@ -254,7 +254,7 @@
 #DO NOT CHANGE the next line, we need it for configure to find the compiler
 #instead of using the default from the "make" program.
 #Use a line further down to change the value for CC.
-CC=
+CC=clang

Right.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/review/3620134206@github.com>

Łukasz Wieczorek

unread,
Dec 30, 2025, 10:13:30 PM (8 hours ago) Dec 30
to vim/vim, Subscribed

@wieczorek1990 commented on this pull request.


In src/Makefile:

> @@ -254,7 +254,7 @@
 #DO NOT CHANGE the next line, we need it for configure to find the compiler
 #instead of using the default from the "make" program.
 #Use a line further down to change the value for CC.
-CC=
+CC=clang

Changed. Please look.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/review/3620136296@github.com>

Christian Brabandt

unread,
4:04 AM (2 hours ago) 4:04 AM
to vim/vim, Subscribed

Closed #19043.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/issue_event/21806431012@github.com>

Christian Brabandt

unread,
4:04 AM (2 hours ago) 4:04 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19043)

This is not needed and the provided shell script is trivial. When I am compiling locally, I typically modify the Makefile (as I often need to compile using different feature flags or test with different compilers) and this works just fine. However in your case, you can just use make <args> CC=clang


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19043/c3701784993@github.com>

Reply all
Reply to author
Forward
0 new messages