Skip to content

mk: Add clang specific flag more selectively. #14384

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

Closed
wants to merge 1 commit into from

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented May 23, 2014

Only add -Qunused-arguments for clang.

@alexcrichton
Copy link
Member

We're currently building successfully on android, so could you describe the error you were seeing in more detail? I'm a little unclear on what the switch here is for.

@luqmana
Copy link
Member Author

luqmana commented May 23, 2014

@alexcrichton The buildbots work because we don't use --enable-clang on them as far as I'm aware. The reason for my change is when I was building with --enable-clang as well as trying to target android it would pass -Qunused-arguments to arm-linux-androideabi-gcc which doesn't recognize the flag and thus would fail. I believe @pnkfelix was the one who added it originally. I just moved it to only be added to the build triple's C[XX]FLAGS.

@alexcrichton
Copy link
Member

So if CFG_BUILD is x86_64-apple-darwin, the cross-compiled code to i686-apple-darwin won't have this flag set, which may mean that it may error?

@luqmana
Copy link
Member Author

luqmana commented May 23, 2014

Hmmm, well I built with --target=i686-apple-darwin,arm-linux-androideabi and didn't seem to run into errors. I can try just removing it altogether and see if that errors?

@alexcrichton
Copy link
Member

We've had some obscure errors in the past from various projects. Sometimes LLVM but perhaps things like libuv as well.

I suppose in theory we should filter per-platform flags and only apply the -Qunused-argument flag to those using clang, although I'm not sure how difficult that would be.

@luqmana
Copy link
Member Author

luqmana commented May 24, 2014

@alexcrichton I made it add the flag to any target with a clang compiler.

@luqmana luqmana changed the title Adjust Makefile to not break android build with enable-clang. mk: Add clang specific flag more selectively. May 24, 2014
bors added a commit that referenced this pull request May 24, 2014
Only add `-Qunused-arguments` for clang.
@bors bors closed this May 24, 2014
@pnkfelix
Copy link
Member

hmm, interesting; maybe the addition of CFG_USING_CLANG was a step in the wrong direction since it sounds like we cannot set that as a global setting anyway, due to cross-compilation scenarios using clang for some contexts and not others.

@luqmana luqmana deleted the mca branch June 5, 2014 23:18
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.

4 participants