Thread overview
Compile errors with ldc-build-runtime --testrunners
Jan 06, 2020
Jacob Carlborg
Jan 06, 2020
Jacob Carlborg
Jan 06, 2020
kinke
Jan 10, 2020
Jacob Carlborg
January 06, 2020
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/26d14c1a292267a32ce64fa7f219acc3d3cca274/std/bigint.d#L855 


-- 
/Jacob Carlborg
January 06, 2020
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
January 06, 2020
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/runtime/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.
January 10, 2020
On 2020-01-06 15:25, kinke wrote:

> druntime/Phobos now requires -dip1000. See https://github.com/ldc-developers/ldc/blob/1743be4e8ea5bee570907c53f85d1658cbd8b1e6/runtime/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