Thread overview
unknown critical section size
4 days ago
IGotD-
4 days ago
kinke
4 days ago
IGotD-
4 days ago
kinke
4 days ago
IGotD-
4 days ago
kinke
4 days ago
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?
4 days ago
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.
4 days ago
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?
4 days ago
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
4 days ago
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.
4 days ago
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