www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Compile errors with ldc-build-runtime --testrunners

reply Jacob Carlborg <doob me.com> writes:
I’m running the ldc-build-runtime tool to build druntime and phobos. 
This compiles fine, but when I add the `--testrunners` flag I get a 
compile error in phobos:

std/bigint.d(855): Error: cannot take address of local `resultBits` in 
` safe` function `toFloatTruncating`
std/bigint.d(954): Error: template instance 
`std.bigint.BigInt.toFloatTruncating!float` error instantiating
std/bigint.d(667):        instantiated from here: `opCmp!float`
std/bigint.d(676):        instantiated from here: `opEquals!float`

I don’t see how that would ever compile. Why hasn’t that been caught by 
the CI pipelines?

https://github.com/ldc-developers/phobos/blob/26d14c1a292267a32ce64fa7f219acc3d3cca2
4/std/bigint.d#L855 


-- 
/Jacob Carlborg
Jan 06 2020
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2020-01-06 14:51, Jacob Carlborg wrote:
 I’m running the ldc-build-runtime tool to build druntime and phobos. 
 This compiles fine, but when I add the `--testrunners` flag I get a 
 compile error in phobos:
To clarify, it seems to be unrelated to the target platform. Happens both when targeting macOS and iOS. -- /Jacob Carlborg
Jan 06 2020
prev sibling parent reply kinke <noone nowhere.com> writes:
On Monday, 6 January 2020 at 13:51:40 UTC, Jacob Carlborg wrote:
 I don’t see how that would ever compile. Why hasn’t that been 
 caught by the CI pipelines?
druntime/Phobos now requires -dip1000. See https://github.com/ldc-developers/ldc/blob/1743be4e8ea5bee570907c53f85d1658cbd8b1e6/runtim /CMakeLists.txt#L40 for the current default D flags. Setting them via ldc-build-runtime's --dFlags overrides these defaults; extending that list instead would probably make more sense.
Jan 06 2020
parent Jacob Carlborg <doob me.com> writes:
On 2020-01-06 15:25, kinke wrote:

 druntime/Phobos now requires -dip1000. See 
 https://github.com/ldc-developers/ldc/blob/1743be4e8ea5bee570907c53f85d1658cbd8b1e6/runtim
/CMakeLists.txt#L40 
 for the current default D flags. Setting them via ldc-build-runtime's 
 --dFlags overrides these defaults; extending that list instead would 
 probably make more sense.
Yeah, that worked, thanks. But if I don't use the `--dFlags` flag I still got the same problem. -- /Jacob Carlborg
Jan 10 2020