Skip to content

Conversation

@wilzbach
Copy link
Contributor

Moving more bits from the posix.mak to build.d.
Depends on #8417.

@wilzbach wilzbach requested a review from MartinNowak as a code owner June 29, 2018 20:09
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + dmd#8418"

@wilzbach wilzbach force-pushed the build2 branch 10 times, most recently from 6f95df5 to 2a9d852 Compare June 30, 2018 14:53
import dmd.globals : Loc;
Expression e = new TypeidExp(Loc.init, null);
Loc loc;
Expression e = new TypeidExp(loc, null);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't part of the DMD build and I only accidentally ended up testing it.
It still doesn't hurt to fix the build failure though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was failing and why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dmd/src/dmd/expression.d

Lines 4758 to 4764 in 67963b9

extern (C++) final class TypeidExp : Expression
{
RootObject obj;
extern (D) this(const ref Loc loc, RootObject o)
{
super(loc, TOK.typeid_, __traits(classInstanceSize, TypeidExp));

That's why Loc.init doesn't work. It might be a good idea to use auto ref in the constructors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loc.initial is used instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
BTW this looks like a half-finished story -> #8427

.circleci/run.sh Outdated

# build dmd, druntime, and phobos
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD ENABLE_WARNINGS=1 PIC="$PIC" all
"$RDMD" ./src/build.d MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD ENABLE_WARNINGS=1 PIC="$PIC" all
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we slowly start introducing build.d into more parts of the CI infrastructure.

@wilzbach wilzbach force-pushed the build2 branch 2 times, most recently from 89070ef to 009a092 Compare June 30, 2018 17:50
if [ "$MODEL" == "64" ] ; then
"$RDMD" ./src/build.d MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD ENABLE_WARNINGS=1 PIC="$PIC" all
else
make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD ENABLE_WARNINGS=1 PIC="$PIC" all
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: MODEL=32 doesn't fully work yet. I will fix this in another PR.

dObjc = true;

return env;
if (env.getDefault("ENABLE_DEBUG", "0") != "0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we copy the documentation comments for these from the Makefile? Or maybe put them in the help output? We should probably do the same for the targets as well. It's not a requirement for this PR, but eventually it'd be nice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, some of these are only applicable to posix, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, some of these are only applicable to posix, right?

Yes, actually I'm not sure all of these modes even work on Posix (i.e. dmd still fails the test suite with ENABLE_DEBUG - #7528).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we copy the documentation comments for these from the Makefile? Or maybe put them in the help output?

Done.

@wilzbach wilzbach force-pushed the build2 branch 2 times, most recently from 18a24ef to b3ed103 Compare July 1, 2018 20:24
@wilzbach wilzbach added the Merge:72h no objection -> merge The PR will be merged if there are no objections raised. label Jul 3, 2018
@dlang-bot dlang-bot merged commit c38306d into dlang:master Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants