This is an archive of the discontinued LLVM Phabricator instance.

Substitute 'cc' with 'c++' when compiling C++ test files.
ClosedPublic

Authored by sivachandra on Nov 10 2014, 1:14 PM.

Details

Reviewers
clayborg
Summary

On a stock Ubuntu system CMAKE_C_COMPILER could be "/usr/bin/cc"
instead of "/usr/bin/gcc". For such cases, replace 'cc' with 'c++' when
compiling C++ test files.

Diff Detail

Event Timeline

sivachandra retitled this revision from to Substitute 'cc' with 'c++' when compiling C++ test files..
sivachandra updated this object.
sivachandra edited the test plan for this revision. (Show Details)
sivachandra added a reviewer: clayborg.
sivachandra added a subscriber: Unknown Object (MLST).
emaste added a subscriber: emaste.Nov 10 2014, 1:18 PM

LGTM.
We have the same issue on FreeBSD - in /usr/bin we have no gcc, but do have clang and cc, and CMake prefers the latter.

emaste added inline comments.Nov 10 2014, 1:19 PM
test/make/Makefile.rules
133–141

It'd be nice if we can line wrap these (perhaps with a trailing \) to make it a bit more readable.

Indenting per Ed Maste's suggestion.

This looks like the same patch as D4679, which the author never ended up submitting. Could you just confirm that the two patches are equivalent? (i.e. that the other patch does not do anything else that your patch does not do?) If the other patch does something additional, maybe you could incorporate it into your patch as well.

Yup D4679 is equivalent. Difference is the indentation format. I do not mind which should go in, but would like one of them to be in.

Does the LGTM from the previous version still stand?

Doesn't matter to me either. Might as well submit yours since you already have it applied locally. Just wanted to make sure there was nothing additional in D4679 that you didn't put in your patch. :)

clayborg accepted this revision.Nov 10 2014, 2:31 PM
clayborg edited edge metadata.

As long as linux and FreeBSD are good with this, I am good.

This revision is now accepted and ready to land.Nov 10 2014, 2:31 PM
sivachandra closed this revision.Dec 19 2014, 2:43 PM

Closing this as Shawn had already committted this for me.