Skip to content
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

Upgrade front-end & libs to v2.085.0 #3003

Merged
merged 23 commits into from
Mar 2, 2019
Merged

Conversation

kinke
Copy link
Member

@kinke kinke commented Feb 18, 2019

No description provided.

@kinke
Copy link
Member Author

kinke commented Feb 18, 2019

Union regression: dlang/dmd#9288

@kinke kinke force-pushed the merge-2.085 branch 3 times, most recently from 22ab436 to cb4273b Compare February 19, 2019 00:27
@kinke
Copy link
Member Author

kinke commented Feb 21, 2019

Still to do:

  • dcompute lit tests fail, due to RTInfo template from object.d (with unsupported global variable) somehow being instantiated.
  • Objective-C related changes for Mac with according dmd-testsuite failures.
  • druntime-test-init_fini failure for Mac, probably trivial to fix.

Should be green otherwise.

@kinke kinke force-pushed the merge-2.085 branch 2 times, most recently from e484486 to 86eeebd Compare February 27, 2019 00:13
@kinke kinke changed the title WIP: Upgrade front-end & libs to v2.085.0-beta.1 WIP: Upgrade front-end & libs to v2.085.0-rc.1 Feb 27, 2019
@kinke
Copy link
Member Author

kinke commented Feb 27, 2019

Besides dcompute and ObjC failures, there's a new druntime standalone test (GC) which fails on both Linux and Mac with shared druntime.

@rainers
Copy link
Contributor

rainers commented Feb 27, 2019

Besides dcompute

Can the definition of RTInfo be versioned out for dcompute? I suspect it doesn't help to have precise GC info with that target.

there's a new druntime standalone test (GC) which fails on both Linux and Mac with shared druntime.

The GC tests rebuild a couple of modules and expect to replace the original ones from the static library. I doubt that works with the runtime in a shared library.

@kinke
Copy link
Member Author

kinke commented Feb 28, 2019

Thx for the hints, Rainer.

Can the definition of RTInfo be versioned out for dcompute?

AFAIK, the dcompute specifics are per-module (i.e., you can compile normal modules alongside dcompute modules in one run), so there's no predefined version for dcompute. I guess the automatic RTInfo instantiation (by the front-end) would need to be skipped for aggregates defined in dcompute modules.

The module replacement not working with shared libs seems to make perfect sense.

@thewilsonator
Copy link
Contributor

AFAIK, the dcompute specifics are per-module (i.e., you can compile normal modules alongside
dcompute modules in one run), so there's no predefined version for dcompute. I guess the automatic
RTInfo instantiation (by the front-end) would need to be skipped for aggregates defined in
dcompute modules.

That is correct, but not quite the whole story, can designate a module for both the host and device. There are a number of ways this could be fixed:
Add a constraint to the RTInfo template and ignore in the compiler if RTInfo!T fails to instantiate
Put all the RTInfo!T in their own LLVM IR module.
Simply don't generate `RTInfo symbols in the dcompute code generator.

@kinke
Copy link
Member Author

kinke commented Feb 28, 2019

[Just for the record, I won't tackle the RTInfo thing myself, in case I'm expected to do every little thing myself.]

kinke added 14 commits March 1, 2019 18:19
This reverts dlang/dmd@f35ff8024c2c, which changed the base type from
int to ubyte. That led to a enum C++ mangling issue, at least for MSVC
targets: https://issues.dlang.org/show_bug.cgi?id=19658

Even if the mangling is fixed, older host compilers wouldn't be able to
compile 2.085-based LDC, so revert to int.
Reusing parsing and usage functionality from DMD, as the number of these
is likely to grow.
Only display the appropriate usage help (and then fail) if invoked
without any explicit cmdline options. Otherwise emit an error about
missing source files and fail immediately, without displaying the usage
help.

Besides making LDC and LDMD behave identically in this regard, it makes
just more sense IMO (when forgetting to specify a file, LDC previously
just printed the cmdline help without any error message).

It also makes `ldmd2 -transition=?` and `ldmd2 -preview=help` etc. print
the expected help without LDMD special cases.
@kinke kinke changed the title WIP: Upgrade front-end & libs to v2.085.0-rc.1 Upgrade front-end & libs to v2.085.0-rc.1 Mar 1, 2019
@rainers
Copy link
Contributor

rainers commented Mar 1, 2019

Add a constraint to the RTInfo template and ignore in the compiler if RTInfo!T fails to instantiate

It's already not generated by the frontend if the template is not defined, so disabling it with version(dcompute_or_whatever) {} else template RTInfo(T)... should suffice.

@kinke kinke changed the title Upgrade front-end & libs to v2.085.0-rc.1 Upgrade front-end & libs to v2.085.0 Mar 2, 2019
@kinke kinke merged commit cf98f9a into ldc-developers:master Mar 2, 2019
@kinke kinke deleted the merge-2.085 branch March 2, 2019 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants