www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - unknown critical section size

reply IGotD- <nise nise.com> writes:
I'm updating my custom druntime to LDC 1.24.0. Previously I 
mentioned this problem with unknown critical section size where 
the compiler only emitted a warning.

rt/profilegc.d(97): Error: unknown critical section size for the 
selected target

https://forum.dlang.org/post/agupeguvxftrucpjvpho forum.dlang.org

However, with LDC 1.24.0 this is no longer a warning but an error 
which prevents me from building druntime. What is necessary in 
order to solve this problem?
Nov 21 2020
parent reply kinke <noone nowhere.com> writes:
On Saturday, 21 November 2020 at 09:47:38 UTC, IGotD- wrote:
 What is necessary in order to solve this problem?
If you don't want to teach the compiler about the critical section size for your target, you'll need to convert all expression-less `synchronized` statements to ones with an explicit mutex.
Nov 21 2020
parent reply IGotD- <nise nise.com> writes:
On Saturday, 21 November 2020 at 12:20:01 UTC, kinke wrote:
 If you don't want to teach the compiler about the critical 
 section size for your target, you'll need to convert all 
 expression-less `synchronized` statements to ones with an 
 explicit mutex.
How do I teach the compiler about the critical section size?
Nov 21 2020
parent reply kinke <noone nowhere.com> writes:
On Saturday, 21 November 2020 at 13:47:55 UTC, IGotD- wrote:
 How do I teach the compiler about the critical section size?
https://github.com/ldc-developers/ldc/blob/8ee390d9605b8d9404ba33cf06dc23605e7ce90a/gen/target.cpp#L39
Nov 21 2020
parent reply IGotD- <nise nise.com> writes:
On Saturday, 21 November 2020 at 14:03:09 UTC, kinke wrote:
 https://github.com/ldc-developers/ldc/blob/8ee390d9605b8d9404ba33cf06dc23605e7ce90a/gen/target.cpp#L39
Thank you, then I will look into this. Since this is compiled into the compiler, it would be beneficial to provide an escape hatch for this. Since I don't have an official llvm target, it would be a good thing to have a compiler option where you can state the size of the critical section on the command line.
Nov 21 2020
parent reply kinke <noone nowhere.com> writes:
On Saturday, 21 November 2020 at 14:32:24 UTC, IGotD- wrote:
 Since I don't have an official llvm target, it would be a good 
 thing to have a compiler option where you can state the size of 
 the critical section on the command line.
Better yet: https://github.com/dlang/dmd/pull/11824
Nov 21 2020
parent reply IGotD- <nise nise.com> writes:
On Saturday, 21 November 2020 at 22:04:58 UTC, kinke wrote:
 Better yet: https://github.com/dlang/dmd/pull/11824
I see that this one has been merged quite a while ago. It didn't get into the latest release (1.24.0), so will this preview end up in a release at all?
Feb 01
parent kinke <noone nowhere.com> writes:
On Monday, 1 February 2021 at 16:13:38 UTC, IGotD- wrote:
 On Saturday, 21 November 2020 at 22:04:58 UTC, kinke wrote:
 Better yet: https://github.com/dlang/dmd/pull/11824
I see that this one has been merged quite a while ago. It didn't get into the latest release (1.24.0), so will this preview end up in a release at all?
Why wouldn't it? It'll be part of 2.096 and thus LDC v1.26.
Feb 01