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 with clang #3

Closed
lewissbaker opened this issue Apr 13, 2017 · 6 comments
Closed

Add support for building with clang #3

lewissbaker opened this issue Apr 13, 2017 · 6 comments
Assignees

Comments

@lewissbaker
Copy link
Owner

@GorNishanov has been working on adding C++ coroutine support to clang and llvm.

The build system needs to be updated to add support for building this library with clang so that it can be tested on compilers other than MSVC.

As far as I can tell, not all of the changes have been upstreamed to clang yet so I'll need to use a custom build of clang in the mean-time.

@GorNishanov
Copy link

About 60% in the trunk.

@lewissbaker
Copy link
Owner Author

I've made some progress towards getting cppcoro building under clang for Windows using libc++.
However, I was still running into some linker issues with unresolved symbols that I need to track down.

I have also been blocked on https://bugs.llvm.org/show_bug.cgi?id=33414 which was causing Clang to go into an infinite loop when compling about half of the test .cpp files. It's possible this bug is only an issue when building with msvc-compatibility mode enabled which could explain why nobody else has run into it yet.

I'll try and get some of the work-in-progress pushed soon.

The snapshot build of Clang for Windows available from http://llvm.org/builds/ should now include enough coroutine support to be dangerous. I may look into having the build-system automatically download and unpack clang from this snapshot build.

@lewissbaker
Copy link
Owner Author

I've pushed some experimental work-in-progress support for Clang under Linux to the 'clang' branch in 5734b5c.

It compiles all source files except for file and io_service related classes but I'm still yet to get it to successfully link; unresolved symbols. Possibly just me doing something silly while trying to build libc++.

@lewissbaker
Copy link
Owner Author

The 'clang' branch should now build and pass all tests as of 7db2848 once you have a clang/libcxx-5.0 dev env setup. Tested under Ubuntu 17.04.

I still need to write up some instructions for building before merging back to master.

@lewissbaker
Copy link
Owner Author

Clang support is now in 'master' branch.

@Qix-
Copy link

Qix- commented Sep 25, 2020

@lewissbaker the readme should be updated, then - master still states it's "planned" which is not the case (we're building successfully using clang on linux).

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

No branches or pull requests

3 participants