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

third_party/Android.mk enhancements: Use LOCAL_CPPFLAGS #281

Open
dneto0 opened this issue Dec 6, 2016 · 6 comments
Open

third_party/Android.mk enhancements: Use LOCAL_CPPFLAGS #281

dneto0 opened this issue Dec 6, 2016 · 6 comments

Comments

@dneto0
Copy link
Collaborator

dneto0 commented Dec 6, 2016

Use LOCAL_CPPFLAGS instead of LOCAL_CXXFLAGS.

LOCAL_CPPFLAGS is newer and recommended.

@taml
Copy link

taml commented Dec 6, 2016

Hello, I'd like to help with this if possible. I'm pretty new to Android, is this just a case of going through the code and switching any use of LOCAL_CXXFLAGS to LOCAL_CPPFLAGS or is there a bit more to it than that? Thanks

@dneto0
Copy link
Collaborator Author

dneto0 commented Dec 7, 2016

Yes, it's just making that change in the one Android.mk file. :-)

Real work is in verifying the change. I'd like to test it with the NDK versions r10e and r13.

Here's an example of how I test the build, customized to NDK location and especially how the tree is checked out. (Actually it's a bit of a wonky structure but it works).

#!/bin/bash

export ANDROID_NDK=$HOME/android-ndk-r10e
export SPVTOOLS_LOCAL_PATH=$SRC_TREE/third_party/spirv-tools
export SPVHEADERS_LOCAL_PATH=$SRC_TREE/third_party/spirv-headers

# Allow use of args like -j 30
exec $ANDROID_NDK/ndk-build NDK_APP_OUT=`pwd` -C $SRC_TREE/third_party/shaderc/android_test \
  V=1 \
  SPVTOOLS_LOCAL_PATH=$SPVTOOLS_LOCAL_PATH \
  SPVHEADERS_LOCAL_PATH=$SPVHEADERS_LOCAL_PATH \
  "$@"

If you can make the Android.mk change and verify with the two versions of the NDK that would be grand!

@taml
Copy link

taml commented Dec 7, 2016

Thanks for the information, I've updated the one Android.mk file, but I think the testing is a little out of my depth, so haven't submitted a PR just yet. If there's anything a little more beginner level I can work on, I'd love to help out!

@dneto0
Copy link
Collaborator Author

dneto0 commented Dec 8, 2016

@taml I hear you. :-) If you're willing to help on another project, I have something in mind in KhronosGroup/SPIRV-Tools. I haven't written it down yet, but it's a nice isolated piece that can be verified on any platform. I'm taking this opportunity to formalize the "help wanted" process and task list in that project. Stay tuned.

@taml
Copy link

taml commented Dec 8, 2016

@dneto0 Yeah sure, I'd definitely be interested in helping out!

@dneto0
Copy link
Collaborator Author

dneto0 commented Dec 9, 2016

Take a look at KhronosGroup/SPIRV-Tools#502
Should be some Python and C++.
Note that SPIRV-Tools is used as a part of Shaderc so if you've built Shaderc then you've already built SPIRV-Tools.
SPIRV-Tools has its own contributors license agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants