-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add compilation scaffolding for plain Android executable #285
Conversation
This enables to obtain plain executables for Android. Two comments:
|
Yes, Android.mk files should have copyrights. If I forgot to add them on the existing files that was a mistake. The 'unable to create engine config' means that your build didn't find vulkan. The erorr comes from samples/config_helper.cc and it's because AMBER_ENGINE_VULKAN is false in the build. |
Make sure you have the LunarG / Vulkan SDK. Then source the env script. Then build Amber. When you run the executable, make sure you have sourced the env script first in that shell. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OMG I love this change. Will be so useful to me.
dj2 has approval authority on this one.
Wait, there's an env script? I've been setting all the env variables manually....sigh. |
@dneto0 I am not sure about the Vulkan SDK env script, since we are building for Android, so the libvulkan is to be found in the Android NDK, and the shell to run the executable is the adb shell on device? |
Thanks for the help, I tried to address all comments. The executable does not fail on the |
94c249d
to
9a2d36a
Compare
The ndk build is failing due to:
I think this is due to kokoro using the old NDK r15, because the latest NDK r19 compiles just fine. I guess the clang shipping in r15 is too old to know about @jaebaek it looks like you introduced those pragma in a previous commit today, what is your opinion on this? |
Aaaahhh, compilers are a pain. Sigh, can you export -Wno-unknown-pragmas in the environment for your ndk build? |
I did not manage to use the environment for exporting A last question: the kokoro script for android_test builds only on armeabi-v7a, should we restrict the default ABI of amber_ndk to armeabi-v7a? Currently android_ndk is built for all Android ABIs, but that may be a waste of kokoro time/resources? |
We limited kokoro to build a single target otherwise the build took too long. Building all the targets took on the order of an hour, this gets it down to minutes. I figured the coverage from a single target was enough to verify the build was still working without the pain of waiting an hour to commit. |
samples/Android.mk
Outdated
ppm.cc | ||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/../include | ||
LOCAL_LDLIBS:=-landroid -lvulkan -llog | ||
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror -DAMBER_ENGINE_VULKAN -Wno-unknown-pragmas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want -DAMBER_ENGINE_VULKAN=1 which would match what the other cmake files output.
8ddb344
to
438b492
Compare
No description provided.