-
-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Second round of makefile/build.d consolidation #10212
Conversation
Thanks for your pull request and interest in making D better, @marler8997! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour 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 locallyIf 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#10212" |
8f44a0b
to
b420999
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks great!
e4fedad
to
7a035fa
Compare
GDC9 on SemaphoreCI fails with:
For more info: |
4421de2
to
0cbd257
Compare
src/build.d
Outdated
}; | ||
sources.backend ~= ((env["OS"] == "windows" && env["MODEL"] == "64") ? ["strtold.d", "longdouble.d"] : []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use a good old if?
src/build.d
Outdated
/// Returns the first argument if the given version is true, otherwise, returns the second argument. | ||
auto versionTernary(string version_, T)(T trueCase, T falseCase) | ||
{ | ||
mixin("version(" ~ version_ ~ ") { return trueCase; }"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we look up the OS in env
?
cf332f4
to
3a787aa
Compare
3a787aa
to
406d77f
Compare
406d77f
to
1dbae43
Compare
src/build.d
Outdated
cod3.d cv8.d dcgcv.d pdata.d util2.d var.d md5.d backconfig.d ph2.d drtlsym.d dwarfeh.d ptrntab.d | ||
dvarstats.d dwarfdbginf.d cgen.d os.d goh.d barray.d cgcse.d elpicpie.d | ||
".split | ||
~ ( (env["OS"] == "osx") ? ["machobj.d"] : ["elfobj.d"] ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume you copied this from the posix makefil, but as there's windows too shouldn't it be sth. like:
( (env["OS"] == "osx") ? ["machobj.d"] : [] )
( (env["OS"] == "linux" || env["OS"] == "freebsd") ? ["elfobj.d"] : [] )
Though you can skip all of this logic, because these files have version (OS)
headers, so there's no problem in keeping things simple and including all.
Windows failure on Azure is not very insightful:
CC @rainers |
3a4c3e2
to
a05801f
Compare
a05801f
to
a5fb684
Compare
a5fb684
to
66b0ede
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
Edit: GH mobile false review.
@thewilsonator @marler8997
I.e. the git checkout 1309c79ec # The merge commit of this PR
make -f posix.mak HOST_DMD=dmd clean
make -f posix.mak HOST_DMD=dmd BUILD=debug all # fails
git checkout 1309c79ec^ # Checkout dmd before this PR was merged
make -f posix.mak HOST_DMD=dmd clean
make -f posix.mak HOST_DMD=dmd BUILD=debug all # succeeds |
…posix.mak PR dlang/dmd#10212 broke building `dmd/src/posix.mak` with `BUILD=debug`. Use `build.d` instead.
…posix.mak PR dlang/dmd#10212 broke building `dmd/src/posix.mak` with `BUILD=debug`. Use `build.d` instead.
…posix.mak PR dlang/dmd#10212 broke building `dmd/src/posix.mak` with `BUILD=debug`. Use `build.d` instead.
This round I'm moving the generation of the backend library to
build.d
.