-gen clang

General FreeBASIC programming questions.
deltarho[1859]
Posts: 4313
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: -gen clang

Post by deltarho[1859] »

Found one. :)

Release Notes
srvaldez
Posts: 3381
Joined: Sep 25, 2005 21:54

Re: -gen clang

Post by srvaldez »

hello deltarho[1859] :)
the link to the binaries https://github.com/llvm/llvm-project/re ... org-18.1.3 surprised me, the 64-bit clang.exe depends only on installed Windows dlls, it's size is 114 MB but it's pretty much standalone :D
here's the list of dll dependencies for clang.exe 64-bit

Code: Select all

MSVCP140.dll
KERNEL32.dll
ADVAPI32.dll
VERSION.dll
OLEAUT32.dll
VCRUNTIME140.dll
VCRUNTIME140_1.dll
api-ms-win-crt-stdio
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
deltarho[1859]
Posts: 4313
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: -gen clang

Post by deltarho[1859] »

@srvaldez

You are going deeper than I am prepared to go.

I will stay with your previous instructions unless you advise otherwise. I should imagine most will do the same.

Your opening post did not bode well for gcc/clang, but with 11.2.0 gcc/clang we have a different story. It is a serious competitor with gcc 9.3.0. I can see gcc/clang being a new standard for fbc especially with the more comprehensive warnings from both gcc 11.2.0 and clang.

In fact, I am now using gcc/clang as my default setup and I then look at gcc 9.3.0. Very often there is not much in it in any respect besides compilation time. gcc/clang really shines in 64-bit.

We need a few members to test, but this is the FreeBASIC forum, so very few will bother to report their findings. antarman did but he is an exception - sadly.
deltarho[1859]
Posts: 4313
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: -gen clang

Post by deltarho[1859] »

Xusinboy Bekchanov reported a serious issue with fbc 1.20.0. This was corrected in the latest build.

The following uses the latest 1.20.0 build. I am only using fbc 1.20.0 with gcc/clang work.

OK, with 32-bit and 64-bit; after a compilation fail on both with previous fbc 1.20.0 build.

FreeBASIC-1.20.0-gcc-11.2.0cl
deltarho[1859]
Posts: 4313
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: -gen clang

Post by deltarho[1859] »

> I am only using fbc 1.20.0 with gcc/clang work.

For that, I use WinFBE plus SCS III. SCS III will build the clang command line for me.

I can also use WinFBE plus SCS and that will build a gcc command line. We get the benefit of the much improved fbc 1.20.0 with gcc 11.2.0. The latter does not do much for us. gcc/clang 11.2.0 is a different animal; especially 64-bit.

So we could use FreeBASIC-1.20.0-gcc-11.2.0cl for gcc only or gcc/clang; one toolchain :!:

Added: Don't forget that if we use gcc/clang and Intel asm syntax we will be in trouble. In that case, we have to use att syntax or a FreeBASIC replacement.
Post Reply