LLVM\Clang 17.0.1 Released

FYI
[LLVM 17.0.1 released! - Announcements - LLVM Discussion Forums](Release Announcement)

5 Likes

FYI llvm 17.0.1 is available in HaikuDepot

8 Likes

Appreciate it!

Thanks for the work on this monster :wink: :ok_hand:

any good ideas, what cool stuff we could build with the shiny new llvm-clang toolchain?

I wouldnā€™t call it ā€˜coolā€™ but it would be nice if the haiku-format tool was updated to the latest version of llvm/clang. I looked at the repository for it a few weeks ago but it seemed like a mess.

2 Likes

Some of the shiny new updates. LLVM
Clang

I am always interested in the analyzers and sanitizers myself.

clang-format looks to have had some good changes.

1 Like

It would be really good to have the sanitizers available on Haiku but as I understand some more porting would be needed for that. Current recipe has COMPILER_RT_BUILD_SANITIZERS set to OFF accordingly.

1 Like

Interesting, I wonder why?

i guess stuff like ptrace and procfs

As the post opened as Off Topic category
I dare to share a funny misunderstanding and association when I was red here on forum about ā€˜Clangā€™ ā€¦

This is because I am rather a trekkie than a coderā€¦

So for reading Clang I had not analyzed as I had not known as a C language alternative but associated a klingon warrior,
called
Klaang

In the STAR TREK series - ENTERPRISE - episodes.

(First honestly my memory tricked me : I remembered as it would be the name of one of famous dahar masters ā€¦ but they are really named
Kor,
Koloth
and the one and only I remembered well :
Kang .
Speaks to my excuse : all these klingon names
starts with ā€˜Kā€™, and I was really sure : the three of them are such way ā€¦ that I remembered well !.. 8D
This is maybe due to Kahless ā€¦ beginning a klingon name with a ā€˜Kā€™ ā€¦ more glorious and honored - )

ā€¦ But back to my ā€œcrosstalkā€ ā€¦

klaang, which pronounced similarly Clang ā€¦ as if someone reads the beginning C = K primarily in English.
Without any following, modifier letter like in case ā€˜CHā€™

However now I know exactly what it is ā€¦ this association engraved in me - so first impression and thought is about a klingon warrior and read it in my mind as the name of it - not
C language :))

Also LLVM, when I first saw in HaikuDepot ā€¦ I was happy : good :
Logical Volume Manager was ported to Haiku "!..

Of course when I clicked and opened the details ā€¦ so this is really rather a development framework ā€¦ then I thought some not too nice about English acronyms and their inventors. :\

Anyway ā€¦
Then I had not read yet about what more Haiku devs thinks and shares as conviction about additional software layers between progs and HW within OS - thatā€™s against Haiku goal as speedy run and efficiency.
Later I met with it on forum and accepted - so now I know :
it is hardly get into Haiku in the near future :j
I assume as it is a like suspicious server-like feature : to enlarge storage without reboot.
I can imagine workstation grade Haiku installs ā€¦ especcially in case 64 bit Haiku, where some virtualization would be welcomed.
Moreover if the ā€˜desktopā€™ not a developer SBC , but a workstation with a Xeon or Threadripper or other Ryzen like multicore monsters with mass amount of memory - I assume a Blender or a personal buildmaster machine would be a graceful for broader HW resources.
But here I close my sentences - it would have been about my funny ā€œmisunderstood, failing hearingsā€ : )

also not to forget about Kling Klang Studio :grin:

It depends at which version of the repository you look at.

During a past GSoC project we made a repo thatā€™s more standardized: GitHub - viveris/llvm-project at haiku-format-10.x

There is also work there to rebase haiku-format changes on newer versions of clang-format, for example GitHub - viveris/llvm-project: The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org. or GitHub - saloniig/llvm-project: The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org. (I donā€™t remember the exact status of the branches). However, after rebasing, there were various regressions that should be fixed, the code formatting was not working fully correctly anymore.

As an experiment, we tried to apply haiku-format to the same version of the Input preferences with the 10.x and the then new version of haiku-format, to identify the regressions, you can find the result of these tests here:

https://review.haiku-os.org/c/haiku/+/4325
https://review.haiku-os.org/c/haiku/+/3826

with comments about things that need to be fixed in each of these versions.

If someone plans to work on this, you should coordinate with @owenca who made most of the initial work on haiku-format and is still contributing to clang-format on llvm side since then. Ideally, all the things we need should be integrated into upstream clang-format, and then haiku-format would just be a config file for clang-format. But this might mean changing the coding style in some places, where our current formatting rules end up being quite hard to automate, and the output of current clang-format versions would be just fine.

2 Likes

any previous work on the sanitizers?

I looked at the repository for it a few weeks ago but it seemed like a mess.

There are two repos:

  1. GitHub - owenca/haiku-format for quickly building haiku-format on Haiku
  2. GitHub - owenca/llvm-project at haiku-format for continued development

Which one did you look at?

Probably the latter. I donā€™t recall seeing the first one before.

clang-format looks to have had some good changes.

Indeed, especially since clang-format 15. Iā€™ll upgrade haiku-format to clang-format 17.0.1 soon because there are a number of new options e.g. InsertBraces (when combined with RemoveBracesLLVM), IntegerLiteralSeparator, InsertNewlineAtEOF, LineEnding, RemoveParentheses, etc. which may be relevant to the Haiku coding style.

The major changes from clang-format 10 to haiku-format were in this commit. Did you have trouble making sense of it? Or did you have problems with the clang-format source code in general?

IMO itā€™s extremely unlikely, unless Haiku is willing to remove the requirements of putting the constructor initializer colon on its own line, ordering and aligning class member specifiers, etc.