Skip to content

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

@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.

2 participants