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

Support for ASM_FLAGS #86

Merged
merged 2 commits into from Oct 1, 2019
Merged

Conversation

kylefleming
Copy link
Contributor

This PR adds support for ASM_FLAGS environment variable being passed to invocations of cmake. This both allows default ASM flags to be provided internally by cc-rs and allows extra flags to be provided by the user via Config.asmflag(). This is important if the cmake project under question includes any ASM files (such as boringssl, which is vendored by grpc-rs).

The implementation here is mostly just a copy-paste of the c/c++ equivalents found in src/lib.rs, so if there's a different approach you'd prefer, please let me know.

@alexcrichton
Copy link
Member

Thanks for the PR! I wasn't actually familiar with this convention of cmake, is this something specific to those projects or is it a standard convention within cmake itself?

@kylefleming
Copy link
Contributor Author

It's standard within cmake. The format is CMAKE_<lang>_FLAGS for all the languages it supports (CUDA, CSharp, Fortran, etc). Here's a language syntax list from the cmake source: https://github.com/Kitware/CMake/blob/16bb46eaf3261a2991e35e22116fd8a51d031b15/Auxiliary/vim/syntax/cmake.vim#L462

src/lib.rs Outdated Show resolved Hide resolved
@alexcrichton
Copy link
Member

Ok cool, thanks for clarifying!

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.

None yet

2 participants