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

build: use libc++ with clang on Travis #23791

Closed
wants to merge 10 commits into from

Conversation

richardlau
Copy link
Member

Testing alternative fix for #23778.

Checklist

@richardlau richardlau added the wip Issues and PRs that are still a work in progress. label Oct 21, 2018
@richardlau
Copy link
Member Author

Did not appear to work 😞

@richardlau richardlau closed this Oct 21, 2018
@richardlau richardlau reopened this Oct 21, 2018
@richardlau
Copy link
Member Author

Trying more things.

@refack
Copy link
Contributor

refack commented Oct 21, 2018

Did you try upgrading stdlibc++ to 4.9?

@richardlau
Copy link
Member Author

@refack I'm trying to see if we can actually use clang (as we're attempting to). If we have to install packages then #23778 already covers this.

@refack
Copy link
Contributor

refack commented Oct 21, 2018

I'm trying to see if we can actually use clang (as we're attempting to). If we have to install packages then #23778 already covers this.

From #23778 (comment) it seems that it does use clang, only it links against the GCC libstdc++-4.8, which has a bug.
(Run make with V=1 to see which compiler is actually used)

@refack
Copy link
Contributor

refack commented Oct 21, 2018

There's -stdlib=libc++ that supposedly tell clang to use it's own libc++

@refack
Copy link
Contributor

refack commented Oct 21, 2018

It works!

@richardlau
Copy link
Member Author

It works!

😮. Going to sleep now, but next steps will be to see if all the environment variable changes were necessary. Maybe also -stdlib=libc++ should be set in CXXFLAGS instead of CXX.

@richardlau richardlau changed the title build: fix compiler selection on Travis builds build: use libc++ with clang on Travis Oct 21, 2018
@richardlau
Copy link
Member Author

Travis overrides the CC/CXX env vars set under the env: key in the matrix:

image

@richardlau
Copy link
Member Author

richardlau commented Oct 24, 2018

This PR allows Travis to build with clang without installing any other packages by making it use libc++ instead of libstdc++. Although it works I'm closing this as this is a non-standard way of building (we only normally use libc++ on macOS) and #23778 better replicates the supported toolchains (gcc 4.9.4 or later) in https://github.com/nodejs/node/blob/master/BUILDING.md#supported-toolchains.

@richardlau richardlau closed this Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants