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

Add support for building under Clang and Linux #26

Merged
merged 17 commits into from
Aug 6, 2017
Merged

Add support for building under Clang and Linux #26

merged 17 commits into from
Aug 6, 2017

Conversation

lewissbaker
Copy link
Owner

  • Updates config.cake to define build variants for Linux+Clang x64 optimised/debug.
  • Some minor tweaks to fix compilation and limit warnings under Clang.
  • Debug uses -O0
  • Optimised uses -O2 -lto

lewissbaker and others added 17 commits July 18, 2017 08:13
Skip building file I/O files as these are currently Windows only.
Fixed missing include.
The promise_type::get_return_object() method was returning a reference
to the promise object, expecting that reference to be passed to the
constructor of recursive_generator<T>.

However, under Clang the result of get_return_object() is assigned to
an 'auto' variable, which ends up taking a copy of the promise object
on the stack and passing that copy into the recursive_generator<T>
constructor.

Modified get_return_object() to return the already-constructed
recursive_generator<T> object.
debug: -O0 -g
optimised: -O2 -g -flto
- Disable the test that requires io_service when not on Windows.
- Add missing #include.
It now supports being built with clang 6.0.
Cast result to (void) where we are intentionally ignoring
the return value.
@lewissbaker
Copy link
Owner Author

Closes #3.

@lewissbaker lewissbaker merged commit 8970e17 into master Aug 6, 2017
@lewissbaker lewissbaker deleted the clang branch August 7, 2017 00:44
Garcia6l20 pushed a commit to Garcia6l20/cppcoro that referenced this pull request Jan 5, 2021
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.

2 participants