aboutsummaryrefslogtreecommitdiff
path: root/build-android/update_external_sources_android.bat
diff options
context:
space:
mode:
authorMike Schuchardt <mikes@lunarg.com>2021-09-22 15:20:31 -0700
committerMike Schuchardt <mikes@lunarg.com>2021-09-24 09:13:19 -0700
commit2c1d52f031350a2f881ea9dba949b0af83f6ac72 (patch)
treee7cd846ff34be9cb8269f5a1ee0e8a5f761980aa /build-android/update_external_sources_android.bat
parent75b3bbac3e1f2c0dafb62c2a61420bbf2879d6b1 (diff)
downloadusermoji-2c1d52f031350a2f881ea9dba949b0af83f6ac72.tar.xz
build: Remove unused components from android build
When Vulkan-Tools split off from Vulkan-LoaderAndValidationLayers it inherited the android build scripts, most of which are not relevant to the projects left in this repo. Also update BUILD.md with latest android toolchain and remove references to the validation layers. Change-Id: If982829fc20e14156c52a8f364ef7294733f62cd
Diffstat (limited to 'build-android/update_external_sources_android.bat')
-rwxr-xr-xbuild-android/update_external_sources_android.bat205
1 files changed, 2 insertions, 203 deletions
diff --git a/build-android/update_external_sources_android.bat b/build-android/update_external_sources_android.bat
index 96823a33..5c6f2554 100755
--- a/build-android/update_external_sources_android.bat
+++ b/build-android/update_external_sources_android.bat
@@ -1,5 +1,5 @@
@echo off
-REM Update source for glslang, spirv-tools, shaderc, vulkan-headers
+REM Update source for vulkan-headers
REM
REM Copyright 2016 The Android Open Source Project
@@ -23,10 +23,6 @@ set errorCode=0
set ANDROID_BUILD_DIR=%~dp0
set BUILD_DIR=%ANDROID_BUILD_DIR%
set BASE_DIR=%BUILD_DIR%\third_party
-set GLSLANG_DIR=%BASE_DIR%\shaderc\third_party\glslang
-set SPIRV_TOOLS_DIR=%BASE_DIR%\shaderc\third_party\spirv-tools
-set SPIRV_HEADERS_DIR=%BASE_DIR%\shaderc\third_party\spirv-tools\external\spirv-headers
-set SHADERC_DIR=%BASE_DIR%\shaderc
set VULKAN_HEADERS_DIR=%BASE_DIR%\Vulkan-Headers
for %%X in (where.exe) do (set FOUND=%%~$PATH:X)
@@ -67,33 +63,6 @@ if %errorCode% neq 0 (goto:error)
REM Read the target versions from external file, which is shared with Linux script
-if not exist %ANDROID_BUILD_DIR%\glslang_revision_android (
- echo.
- echo Missing glslang_revision_android file. Place it in %ANDROID_BUILD_DIR%
- goto:error
-)
-
-if not exist %ANDROID_BUILD_DIR%\spirv-tools_revision_android (
- echo.
- echo Missing spirv-tools_revision_android file. Place it in %ANDROID_BUILD_DIR%
- set errorCode=1
- goto:error
-)
-
-if not exist %ANDROID_BUILD_DIR%\spirv-headers_revision_android (
- echo.
- echo Missing spirv-headers_revision_android file. Place it in %ANDROID_BUILD_DIR%
- set errorCode=1
- goto:error
-)
-
-if not exist %ANDROID_BUILD_DIR%\shaderc_revision_android (
- echo.
- echo Missing shaderc_revision_android file. Place it in %ANDROID_BUILD_DIR%
- set errorCode=1
- goto:error
-)
-
if not exist %ANDROID_BUILD_DIR%\vulkan-headers_revision_android (
echo.
echo Missing vulkan-headers_revision_android file. Place it in %ANDROID_BUILD_DIR%
@@ -101,64 +70,13 @@ if not exist %ANDROID_BUILD_DIR%\vulkan-headers_revision_android (
goto:error
)
-set /p GLSLANG_REVISION= < glslang_revision_android
-set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision_android
-set /p SPIRV_HEADERS_REVISION= < spirv-headers_revision_android
-set /p SHADERC_REVISION= < shaderc_revision_android
set /p VULKAN_HEADERS_REVISION= < vulkan-headers_revision_android
-echo GLSLANG_REVISION=%GLSLANG_REVISION%
-echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION%
-echo SPIRV_HEADERS_REVISION=%SPIRV_HEADERS_REVISION%
-echo SHADERC_REVISION=%SHADERC_REVISION%
echo VULKAN_HEADERS_REVISION=%VULKAN_HEADERS_REVISION%
-echo Creating and/or updating glslang, spirv-tools, spirv-headers, shaderc, vulkan-headers in %BASE_DIR%
+echo Creating vulkan-headers in %BASE_DIR%
-set sync-glslang=0
-set sync-spirv-tools=0
-set sync-spirv-headers=0
-set sync-shaderc=0
set sync-vulkan-headers=1
-set build-shaderc=0
-
-if %sync-shaderc% equ 1 (
- if not exist %SHADERC_DIR% (
- call:create_shaderc
- )
- if %errorCode% neq 0 (goto:error)
- call:update_shaderc
- if %errorCode% neq 0 (goto:error)
-)
-
-if %sync-glslang% equ 1 (
- if not exist %GLSLANG_DIR% (
- call:create_glslang
- )
- if %errorCode% neq 0 (goto:error)
- call:update_glslang
- if %errorCode% neq 0 (goto:error)
-)
-
-if %sync-spirv-tools% equ 1 (
- if %ERRORLEVEL% neq 0 (goto:error)
- if not exist %SPIRV_TOOLS_DIR% (
- call:create_spirv-tools
- )
- if %errorCode% neq 0 (goto:error)
- call:update_spirv-tools
- if %errorCode% neq 0 (goto:error)
-)
-
-if %sync-spirv-headers% equ 1 (
- if %ERRORLEVEL% neq 0 (goto:error)
- if not exist %SPIRV_HEADERS_DIR% (
- call:create_spirv-headers
- )
- if %errorCode% neq 0 (goto:error)
- call:update_spirv-headers
- if %errorCode% neq 0 (goto:error)
-)
if %sync-vulkan-headers% equ 1 (
if %ERRORLEVEL% neq 0 (goto:error)
@@ -170,11 +88,6 @@ if %sync-vulkan-headers% equ 1 (
if %errorCode% neq 0 (goto:error)
)
-if %build-shaderc% equ 1 (
- call:build_shaderc
- if %errorCode% neq 0 (goto:error)
-)
-
echo.
echo Exiting
goto:finish
@@ -195,120 +108,6 @@ goto:eof
REM // ======== Functions ======== //
-:create_glslang
- echo.
- echo Creating local glslang repository %GLSLANG_DIR%
- if not exist "%GLSLANG_DIR%\" mkdir %GLSLANG_DIR%
- cd %GLSLANG_DIR%
- git clone https://github.com/KhronosGroup/glslang.git .
- git checkout %GLSLANG_REVISION%
- if not exist %GLSLANG_DIR%\SPIRV (
- echo glslang source download failed!
- set errorCode=1
- )
-goto:eof
-
-:update_glslang
- echo.
- echo Updating %GLSLANG_DIR%
- cd %GLSLANG_DIR%
- git fetch --all
- git checkout %GLSLANG_REVISION%
- if not exist %GLSLANG_DIR%\SPIRV (
- echo glslang source update failed!
- set errorCode=1
- )
-goto:eof
-
-:create_spirv-tools
- echo.
- echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR%
- if not exist "%SPIRV_TOOLS_DIR%\" mkdir %SPIRV_TOOLS_DIR%
- cd %SPIRV_TOOLS_DIR%
- git clone https://github.com/KhronosGroup/SPIRV-Tools.git .
- git checkout %SPIRV_TOOLS_REVISION%
- if not exist %SPIRV_TOOLS_DIR%\source (
- echo spirv-tools source download failed!
- set errorCode=1
- )
-goto:eof
-
-:update_spirv-tools
- echo.
- echo Updating %SPIRV_TOOLS_DIR%
- cd %SPIRV_TOOLS_DIR%
- git fetch --all
- git checkout %SPIRV_TOOLS_REVISION%
- if not exist %SPIRV_TOOLS_DIR%\source (
- echo spirv-tools source update failed!
- set errorCode=1
- )
-goto:eof
-
-:create_spirv-headers
- echo.
- echo Creating local spirv-headers repository %SPIRV_HEADERS_DIR%
- if not exist "%SPIRV_HEADERS_DIR%\" mkdir %SPIRV_HEADERS_DIR%
- cd %SPIRV_HEADERS_DIR%
- git clone https://github.com/KhronosGroup/SPIRV-Headers.git .
- git checkout %SPIRV_HEADERS_REVISION%
- if not exist %SPIRV_HEADERS_DIR%\include (
- echo spirv-headers source download failed!
- set errorCode=1
- )
-goto:eof
-
-:update_spirv-headers
- echo.
- echo Updating %SPIRV_HEADERS_DIR%
- cd %SPIRV_HEADERS_DIR%
- git fetch --all
- git checkout %SPIRV_HEADERS_REVISION%
- if not exist %SPIRV_HEADERS_DIR%\include (
- echo spirv-headers source update failed!
- set errorCode=1
- )
-goto:eof
-
-:create_shaderc
- echo.
- echo Creating local shaderc repository %SHADERC_DIR%
- if not exist "%SHADERC_DIR%\" mkdir %SHADERC_DIR%
- cd %SHADERC_DIR%
- git clone https://github.com/google/shaderc.git .
- git checkout %SHADERC_REVISION%
- if not exist %SHADERC_DIR%\libshaderc (
- echo shaderc source download failed!
- set errorCode=1
- )
-goto:eof
-
-:update_shaderc
- echo.
- echo Updating %SHADERC_DIR%
- cd %SHADERC_DIR%
- git fetch --all
- git checkout %SHADERC_REVISION%
- if not exist %SHADERC_DIR%\libshaderc (
- echo shaderc source update failed!
- set errorCode=1
- )
-goto:eof
-
-:build_shaderc
- echo.
- echo Building %SHADERC_DIR%
- cd %SHADERC_DIR%\android_test
- echo Building shaderc with Android NDK
- call ndk-build NDK_APPLICATION_MK=../../../jni/shaderc/Application.mk THIRD_PARTY_PATH=../third_party -j 4
- REM Check for existence of one lib, even though we should check for all results
- if not exist %SHADERC_DIR%\android_test\obj\local\x86\libshaderc.a (
- echo.
- echo shaderc build failed!
- set errorCode=1
- )
-goto:eof
-
:create_vulkan-headers
echo.
echo Creating local vulkan-headers repository %VULKAN_HEADERS_DIR%