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

Fix NDK build. #540

Merged
merged 2 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Shaderc has been shipping in the
[Android NDK](https://developer.android.com/ndk/index.html) since version r12b.
(The NDK build uses sources from https://android.googlesource.com/platform/external/shaderc/.
Those repos are downstream from GitHub.)
We currently require r18b.

For licensing terms, please see the [`LICENSE`](LICENSE) file. If interested in
contributing to this project, please see [`CONTRIBUTING.md`](CONTRIBUTING.md).
Expand Down
4 changes: 2 additions & 2 deletions android_test/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_ABI := all
APP_BUILD_SCRIPT := Android.mk
APP_STL := gnustl_static
APP_PLATFORM := android-9
APP_STL := c++_static
APP_PLATFORM := android-16
11 changes: 6 additions & 5 deletions kokoro/ndk-build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ wget -q https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linu
unzip -q ninja-linux.zip
export PATH="$PWD:$PATH"

# NDK Path
export ANDROID_NDK=/opt/android-ndk-r15c
# Get Android NDK.
wget -q https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
unzip -q android-ndk-r18b-linux-x86_64.zip
export ANDROID_NDK=$PWD/android-ndk-r18b

# Get shaderc dependencies.
cd $SRC
./utils/git-sync-deps

cd $SRC/
cd $SRC
mkdir build
cd $SRC/build

Expand All @@ -48,8 +50,7 @@ $ANDROID_NDK/ndk-build \
NDK_APP_OUT=`pwd` \
V=1 \
SPVTOOLS_LOCAL_PATH=$SRC/third_party/spirv-tools \
SPVHEADERS_LOCAL_PATH=$SRC/third_party/spirv-tools/external/spirv-headers \
SPVHEADERS_LOCAL_PATH=$SRC/third_party/spirv-headers \
-j 8

echo $(date): ndk-build completed.

17 changes: 17 additions & 0 deletions kokoro/ndk-build/presubmit_khronos.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Presubmit build configuration.
#
build_file: "shaderc/kokoro/ndk-build/build_khronos.sh"