Martin Storsjo Clang-based Mingw

Started by MrBcx, October 02, 2021, 11:12:04 AM

Previous topic - Next topic

Robert

Quote from: jbk on October 02, 2021, 04:23:44 PM
Hi MrBcx and Robert, has either of posted a llvm batch file?
if not, would you post it ?
Robert, I didn't expect -D__USE_MINGW_ANSI_STDIO=1 to work with llvm especially since it uses mscrt

Hi jbk:

This comment was not for LLVM but for LLVM-MinGW. Different projects.

Martin Storsjo's LLVM-MinGW is a MinGW with a LLVM backend.

That compiler line define in my original post is only for the LLVM-MinGW UCRT gcc and g++ which do not use MSVCRT.

What are you looking for regarding batch file?

LLVM CLang ?
LLVM-MinGW Clang ?
LLVM-MinGW gcc ?
LLVM-MinGW g++ ?

Y

jbk

#8
Hi MrBcx and Robert, has either of posted a llvm batch file?
if not, would you post it ?
Robert, I didn't expect -D__USE_MINGW_ANSI_STDIO=1 to work with llvm especially since it uses mscrt

MrBcx

Quote from: Robert on October 02, 2021, 03:16:17 PM
 
Hi MrBCX:

On the compiler command line add

-D__USE_MINGW_ANSI_STDIO=1

That should fix the problem.

Thanks Robert ... that did the trick.

On my PC, UCRT 64-bit version of BCX translates 0.20 seconds slower than
Embarcadero 7.5 and 0.10 seconds slower than Clang+MSVC.  But I realize
the UCRT selling point is not speed, it is stability and ISO correctness.  How
well it pulls that off remains to be seen.


Robert

Quote from: MrBcx on October 02, 2021, 02:31:00 PM
Quote from: jbk on October 02, 2021, 01:41:33 PM
that's a surprising result

The UCRT version presents a dubious result.  I struggle with believing that BCX can
translate itself in less than 0.01 seconds on my PC but maybe it is ... 

UPDATE 1 ... it definitely is NOT 0.00 sec's

I placed a PRINT TIMER near the top and bottom of FUNCTION Main and observed
roughly 0.9 seconds elapse time between them.  So, the UCRT version is messing
up the proper display of the Elapsed translation time.



UPDATE 2 ... Specifically,
                              sprintf(Buf_1, "%1.*Lf", Decimals, Num);
                   in the USING$ function.

Hi MrBCX:

On the compiler command line add

-D__USE_MINGW_ANSI_STDIO=1

That should fix the problem.

MrBcx

#5
Quote from: jbk on October 02, 2021, 01:41:33 PM
that's a surprising result

The UCRT version presents a dubious result.  I struggle with believing that BCX can
translate itself in less than 0.01 seconds on my PC but maybe it is ... 

UPDATE 1 ... it definitely is NOT 0.00 sec's

I placed a PRINT TIMER near the top and bottom of FUNCTION Main and observed
roughly 0.9 seconds elapse time between them.  So, the UCRT version is messing
up the proper display of the Elapsed translation time.



UPDATE 2 ... Specifically,
                              sprintf(Buf_1, "%1.*Lf", Decimals, Num);
                   in the USING$ function.

jbk


MrBcx

Quote from: jbk on October 02, 2021, 11:35:55 AM
interesting
have you tried the msvcrt version ?

Just for you ... See attached

jbk

#2
interesting
have you tried the msvcrt version ?

MrBcx

I decided to test Martin's UCRT version of Mingw again today, just to see how it has matured.

The attached screenshot shows an already speedy ( 0.66 sec's ) version of BCX,
compiled with Embarcadero 7.5, apparently being obliterated using Martin's compiler ( 0.00 sec's )

At first, I thought Martin's compiler was not compiling BCX's elapsed time correctly but
this little test program shows that the elapsed-time function is indeed working.

DIM Elapsed!
PAUSE
Elapsed! = (float)clock()/(float)CLOCKS_PER_SEC
PRINT Elapsed!
PAUSE




Ref:  https://github.com/mstorsjo/llvm-mingw/releases/tag/20211002